I load the data from the server in portions and display a list. When scrolling to the bottom of the new download begins. I want at this moment to appear below the panel, on which the progressBar
and the small text " loading...
" would be located, I AsyncTask
data using AsyncTask
. Tried to call in onPreExecute()
method
proBar = (ProgressBar) findViewById(R.id.progress_bar); proBar.setVisibility(View.VISIBLE); edText = (EditText) findViewById(R.id.progress_bar_text); edText.setVisibility(View.VISIBLE);
and switch to onPostExecute
, but nothing is displayed, why?
This is what the layout looks like:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <!-- Данные списком --> <ListView android:id=" @android :id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffffff" />
<! - Panel with progressBar and comments ->
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center"> <!-- Прогресс-бар и коммент --> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center"> <ProgressBar android:id="@+id/progress_bar" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <EditText android:id="@+id/progress_bar_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center_horizontal" android:text="loading search engines..." android:ems="10" > </EditText> </LinearLayout> </LinearLayout>