Android : Showing Indeterminated progress in support actionbar

on Friday, December 12, 2014


I read a blog article about how to show indeterminated progress in support actionabar. But unfortunately it seems not working at all.The progress doesn't show. What could be wrong?


Here is my code:



package com.test.demo;

import android.app.AlertDialog;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import java.util.List;

public class DemoActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.activity_edit_friends);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setSupportProgressBarIndeterminateVisibility(true);
}

0 comments:

Post a Comment