List of usage examples for android.view Window FEATURE_INDETERMINATE_PROGRESS
int FEATURE_INDETERMINATE_PROGRESS
To view the source code for android.view Window FEATURE_INDETERMINATE_PROGRESS.
Click Source Link
From source file:Main.java
public static void setSpinnerState(Activity a) { if (isMediaScannerScanning(a)) { // start the progress spinner a.getWindow().setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS, Window.PROGRESS_INDETERMINATE_ON); a.getWindow().setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS, Window.PROGRESS_VISIBILITY_ON); } else {/*from ww w . j ava 2 s.co m*/ // stop the progress spinner a.getWindow().setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS, Window.PROGRESS_VISIBILITY_OFF); } }
From source file:com.project.eden.EdenMain.java
@Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mainContext = this; setProgressBarIndeterminateVisibility(true); // start Facebook Login Session.openActiveSession(this, true, new Session.StatusCallback() { // callback when session changes state @Override//from www.j a va 2 s.c om public void call(Session session, SessionState state, Exception exception) { if (session.isOpened()) { // make request to the /me API Request.executeMyFriendsRequestAsync(session, new Request.GraphUserListCallback() { // callback after Graph API response with user object public void onCompleted(List<GraphUser> users, Response response) { if (users != null && !users.isEmpty()) { LinkedList<String> friendlist = new LinkedList<String>(); for (GraphUser user : users) { String u = "https://graph.facebook.com/" + user.getId() + "/picture?type=large"; friendlist.add(u); } String[] listofurls = friendlist.toArray(new String[friendlist.size()]); // friendlist now is a string list of all of your friend's profile pic url GridView gridview = (GridView) findViewById(R.id.gridview); gridview.setAdapter(new ImageAdapter(mainContext, listofurls)); } } }); } } }); }
From source file:de.elanev.studip.android.app.frontend.messages.MessageDetailActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // First request toolbar progrss indicator supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); // Then set the content with toolbar setContentView(R.layout.content_frame); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar);/*from ww w . j a va 2s . c o m*/ ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setHomeButtonEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); } setTitle(R.string.compose_message); Intent extras = getIntent(); // No arguments, nothing to display, finish activity if (extras == null) { finish(); return; } if (savedInstanceState == null) { MessageDetailFragment messageDetailFragment = MessageDetailFragment.newInstance(extras.getExtras()); getSupportFragmentManager().beginTransaction() .add(R.id.content_frame, messageDetailFragment, MessageComposeFragment.class.getName()) .commit(); } }
From source file:com.qubling.sidekick.ui.module.ModuleActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); }
From source file:de.elanev.studip.android.app.frontend.messages.MessageComposeActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); Bundle args = getIntent().getExtras(); setContentView(R.layout.content_frame); setTitle(R.string.compose_message);/*from w w w . ja v a 2s . c om*/ getSupportActionBar().setDisplayHomeAsUpEnabled(true); // // FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); // Fragment frag = MessageComposeFragment.instantiate(this, // MessageComposeFragment.class.getName()); // frag.setArguments(args); // ft.replace(R.id.content_frame, frag, "messageComposeFragment").commit(); if (savedInstanceState == null) { MessageComposeFragment meesageComposeFragment = MessageComposeFragment.newInstance(args); getSupportFragmentManager().beginTransaction() .add(R.id.content_frame, meesageComposeFragment, MessageComposeFragment.class.getName()) .commit(); } }
From source file:org.jamienicol.episodes.AddShowSearchActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.add_show_search_activity); getSupportActionBar().setDisplayHomeAsUpEnabled(true); Intent intent = getIntent();//from w w w. j a v a2s .co m String query = intent.getStringExtra("query"); getSupportActionBar().setTitle(query); // create and add search fragment, // but only on the first time the activity is created if (savedInstanceState == null) { AddShowSearchFragment fragment = AddShowSearchFragment.newInstance(query); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.add(R.id.search_fragment_container, fragment); transaction.commit(); } }
From source file:com.bukanir.android.activities.MovieActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { Log.d(TAG, "onCreate"); super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.activity_movie); fragmentManager = getSupportFragmentManager(); final ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayShowTitleEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); if (savedInstanceState != null) { movie = (Movie) savedInstanceState.getSerializable("movie"); } else {/* ww w. ja v a 2s . c o m*/ Bundle bundle = getIntent().getExtras(); movie = (Movie) bundle.get("movie"); movieTask = new MovieTask(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { movieTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } else { movieTask.execute(); } } }
From source file:org.anhonesteffort.flock.MyCalendarsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); requestWindowFeature(Window.FEATURE_PROGRESS); setContentView(R.layout.simple_fragment_activity); getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar().setTitle(R.string.title_my_calendars); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); Fragment calendarsFragment = new MyCalendarsFragment(); calendarsFragment.setHasOptionsMenu(true); fragmentTransaction.replace(R.id.fragment_view, calendarsFragment); fragmentTransaction.commit();/*w w w .j ava 2s .c o m*/ }
From source file:org.anhonesteffort.flock.MyAddressbooksActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); requestWindowFeature(Window.FEATURE_PROGRESS); setContentView(R.layout.simple_fragment_activity); getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar().setTitle(R.string.title_my_addressbooks); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); Fragment addressbooksFragment = new MyAddressbooksFragment(); addressbooksFragment.setHasOptionsMenu(false); fragmentTransaction.replace(R.id.fragment_view, addressbooksFragment); fragmentTransaction.commit();// w ww .j a v a2s.co m }
From source file:org.anhonesteffort.flock.ImportContactsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); requestWindowFeature(Window.FEATURE_PROGRESS); setContentView(R.layout.activity_with_action_button); getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar().setTitle(R.string.title_import_contacts); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); Fragment importContactsFragment = new ImportContactsFragment(); importContactsFragment.setHasOptionsMenu(false); fragmentTransaction.replace(R.id.fragment_view, importContactsFragment); fragmentTransaction.commit();//from w w w .j a v a 2 s . c om }