Created
August 29, 2012 13:43
-
-
Save kennydude/3512711 to your computer and use it in GitHub Desktop.
ProgressBar in ActionBar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean onCreateOptionsMenu(final Menu menu) { | |
// Inflate Layout here | |
// ProgressBar | |
if(isRefreshing){ | |
ProgressBar p = new ProgressBar(this, null, android.R.attr.progressBarStyleSmall); | |
menu.findItem(R.id.refreshAction).setActionView(p).setEnabled(false); | |
} | |
// Do other crazy stuff here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment