The Android Progress bar not showing up
up vote
0
down vote
favorite
This is my layout xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/fragment_body"
android:fitsSystemWindows="true">
<include
android:id="@+id/contextToolBar"
layout="@layout/context_toolbar_layout" />
<android.support.v7.widget.RecyclerView
android:id="@+id/list1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/contextToolBar"
android:scrollbarSize="5dp"
android:scrollbarThumbVertical="@color/scrollbarColor"
android:scrollbars="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<ProgressBar
android:id="@+id/delete_progress"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone" />
It displays a grid of images in the recyclerview.
I can select a bunch of images & have an option to delete them.
The following is the delete logic:
public void deleteSelectedFiles(final Context context, final List<MediaModel> selectionList) {
String confirmationMessage = getString(R.string.delete_confirm_message);
new AlertDialog.Builder(context)
.setTitle(getString(R.string.action_delete))
.setMessage(confirmationMessage)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.yes, (dialog, whichButton) -> {
View progressBar = getActivity().findViewById(R.id.delete_progress);
dialog.cancel();
progressBar.setVisibility(View.VISIBLE);
deleteFileList(selectionList, this.getActivity());
progressBar.setVisibility(View.GONE);
})
.setNegativeButton(android.R.string.no, null).show();
}
I am expecting the progress bar to display in the foreground while the delete operation is going on. But it just doesn't show up. Any help would be highly appreciated.
android android-layout android-recyclerview progress-bar android-progressbar
add a comment |
up vote
0
down vote
favorite
This is my layout xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/fragment_body"
android:fitsSystemWindows="true">
<include
android:id="@+id/contextToolBar"
layout="@layout/context_toolbar_layout" />
<android.support.v7.widget.RecyclerView
android:id="@+id/list1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/contextToolBar"
android:scrollbarSize="5dp"
android:scrollbarThumbVertical="@color/scrollbarColor"
android:scrollbars="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<ProgressBar
android:id="@+id/delete_progress"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone" />
It displays a grid of images in the recyclerview.
I can select a bunch of images & have an option to delete them.
The following is the delete logic:
public void deleteSelectedFiles(final Context context, final List<MediaModel> selectionList) {
String confirmationMessage = getString(R.string.delete_confirm_message);
new AlertDialog.Builder(context)
.setTitle(getString(R.string.action_delete))
.setMessage(confirmationMessage)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.yes, (dialog, whichButton) -> {
View progressBar = getActivity().findViewById(R.id.delete_progress);
dialog.cancel();
progressBar.setVisibility(View.VISIBLE);
deleteFileList(selectionList, this.getActivity());
progressBar.setVisibility(View.GONE);
})
.setNegativeButton(android.R.string.no, null).show();
}
I am expecting the progress bar to display in the foreground while the delete operation is going on. But it just doesn't show up. Any help would be highly appreciated.
android android-layout android-recyclerview progress-bar android-progressbar
Upload your project to github and share a link so I can take a look
– Skemelio
Nov 11 at 10:05
@Skemelio I am not sure if I can do that since it is for a commercial application.
– Adi
Nov 11 at 10:35
Do you set the progressbar invisible anywhere in the project?
– Skemelio
Nov 11 at 10:52
As you understand without seeing code we can only take guesses
– Skemelio
Nov 11 at 10:54
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is my layout xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/fragment_body"
android:fitsSystemWindows="true">
<include
android:id="@+id/contextToolBar"
layout="@layout/context_toolbar_layout" />
<android.support.v7.widget.RecyclerView
android:id="@+id/list1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/contextToolBar"
android:scrollbarSize="5dp"
android:scrollbarThumbVertical="@color/scrollbarColor"
android:scrollbars="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<ProgressBar
android:id="@+id/delete_progress"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone" />
It displays a grid of images in the recyclerview.
I can select a bunch of images & have an option to delete them.
The following is the delete logic:
public void deleteSelectedFiles(final Context context, final List<MediaModel> selectionList) {
String confirmationMessage = getString(R.string.delete_confirm_message);
new AlertDialog.Builder(context)
.setTitle(getString(R.string.action_delete))
.setMessage(confirmationMessage)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.yes, (dialog, whichButton) -> {
View progressBar = getActivity().findViewById(R.id.delete_progress);
dialog.cancel();
progressBar.setVisibility(View.VISIBLE);
deleteFileList(selectionList, this.getActivity());
progressBar.setVisibility(View.GONE);
})
.setNegativeButton(android.R.string.no, null).show();
}
I am expecting the progress bar to display in the foreground while the delete operation is going on. But it just doesn't show up. Any help would be highly appreciated.
android android-layout android-recyclerview progress-bar android-progressbar
This is my layout xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/fragment_body"
android:fitsSystemWindows="true">
<include
android:id="@+id/contextToolBar"
layout="@layout/context_toolbar_layout" />
<android.support.v7.widget.RecyclerView
android:id="@+id/list1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/contextToolBar"
android:scrollbarSize="5dp"
android:scrollbarThumbVertical="@color/scrollbarColor"
android:scrollbars="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<ProgressBar
android:id="@+id/delete_progress"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone" />
It displays a grid of images in the recyclerview.
I can select a bunch of images & have an option to delete them.
The following is the delete logic:
public void deleteSelectedFiles(final Context context, final List<MediaModel> selectionList) {
String confirmationMessage = getString(R.string.delete_confirm_message);
new AlertDialog.Builder(context)
.setTitle(getString(R.string.action_delete))
.setMessage(confirmationMessage)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.yes, (dialog, whichButton) -> {
View progressBar = getActivity().findViewById(R.id.delete_progress);
dialog.cancel();
progressBar.setVisibility(View.VISIBLE);
deleteFileList(selectionList, this.getActivity());
progressBar.setVisibility(View.GONE);
})
.setNegativeButton(android.R.string.no, null).show();
}
I am expecting the progress bar to display in the foreground while the delete operation is going on. But it just doesn't show up. Any help would be highly appreciated.
android android-layout android-recyclerview progress-bar android-progressbar
android android-layout android-recyclerview progress-bar android-progressbar
edited Nov 10 at 19:47
asked Nov 10 at 19:04
Adi
981110
981110
Upload your project to github and share a link so I can take a look
– Skemelio
Nov 11 at 10:05
@Skemelio I am not sure if I can do that since it is for a commercial application.
– Adi
Nov 11 at 10:35
Do you set the progressbar invisible anywhere in the project?
– Skemelio
Nov 11 at 10:52
As you understand without seeing code we can only take guesses
– Skemelio
Nov 11 at 10:54
add a comment |
Upload your project to github and share a link so I can take a look
– Skemelio
Nov 11 at 10:05
@Skemelio I am not sure if I can do that since it is for a commercial application.
– Adi
Nov 11 at 10:35
Do you set the progressbar invisible anywhere in the project?
– Skemelio
Nov 11 at 10:52
As you understand without seeing code we can only take guesses
– Skemelio
Nov 11 at 10:54
Upload your project to github and share a link so I can take a look
– Skemelio
Nov 11 at 10:05
Upload your project to github and share a link so I can take a look
– Skemelio
Nov 11 at 10:05
@Skemelio I am not sure if I can do that since it is for a commercial application.
– Adi
Nov 11 at 10:35
@Skemelio I am not sure if I can do that since it is for a commercial application.
– Adi
Nov 11 at 10:35
Do you set the progressbar invisible anywhere in the project?
– Skemelio
Nov 11 at 10:52
Do you set the progressbar invisible anywhere in the project?
– Skemelio
Nov 11 at 10:52
As you understand without seeing code we can only take guesses
– Skemelio
Nov 11 at 10:54
As you understand without seeing code we can only take guesses
– Skemelio
Nov 11 at 10:54
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242430%2fthe-android-progress-bar-not-showing-up%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Upload your project to github and share a link so I can take a look
– Skemelio
Nov 11 at 10:05
@Skemelio I am not sure if I can do that since it is for a commercial application.
– Adi
Nov 11 at 10:35
Do you set the progressbar invisible anywhere in the project?
– Skemelio
Nov 11 at 10:52
As you understand without seeing code we can only take guesses
– Skemelio
Nov 11 at 10:54