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:com.arantius.tivocommander.Upcoming.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle bundle = getIntent().getExtras(); MindRpc.init(this, bundle); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.list_empty); findViewById(android.R.id.empty).setVisibility(View.GONE); String collectionId = null;/*from ww w . j a va2s . c o m*/ if (bundle != null) { collectionId = bundle.getString("collectionId"); if (collectionId == null) { Utils.toast(this, "Oops; missing collection ID", Toast.LENGTH_SHORT); } else { setProgressBarIndeterminateVisibility(true); UpcomingSearch request = new UpcomingSearch(collectionId); MindRpc.addRequest(request, mUpcomingListener); } } Utils.log(String.format("Upcoming: collectionId:%s", collectionId)); }
From source file:com.android.mms.ui.ConversationList.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); String launchMode = getLaunchMode(MMS_LAUNCH_MODE_PATH); if (!"folder".equals(launchMode)) { setLaunchMode(MMS_LAUNCH_MODE_PATH, "conversation"); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.conversation_list_screen); mQueryHandler = new ThreadListQueryHandler(getContentResolver()); // ListView listView = getListView();/*from w w w .jav a 2s. c o m*/ LayoutInflater inflater = LayoutInflater.from(this); ConversationListItem headerView = (ConversationListItem) inflater .inflate(R.layout.conversation_list_item, listView, false); /*---------------------by lai----------------------------*/ headerView.setVisibility(View.GONE); LayoutParams laParams = (LayoutParams) headerView.getLayoutParams(); laParams.height = 1;// headerView.setLayoutParams(laParams);// /*---------------------by lai----------------------------*/ headerView.bind(getString(R.string.new_message), getString(R.string.create_new_message)); listView.addHeaderView(headerView, null, true); listView.setOnCreateContextMenuListener(mConvListOnCreateContextMenuListener); listView.setOnKeyListener(mThreadListKeyListener); initListAdapter(); mTitle = getString(R.string.app_label); mHandler = new Handler(); mPrefs = PreferenceManager.getDefaultSharedPreferences(this); boolean checkedMessageLimits = mPrefs.getBoolean(CHECKED_MESSAGE_LIMITS, false); if (DEBUG) Log.v(TAG, "checkedMessageLimits: " + checkedMessageLimits); if (!checkedMessageLimits || DEBUG) { runOneTimeStorageLimitCheckForLegacyMessages(); } // fixed bug for 19102 19105 start if (MmsApp.initMms) { Conversation.init(this, true); } // fixed bug for 19102 19105 end } else { Intent it = new Intent(this, MessageFolderActivity.class); startActivity(it); this.finish(); } }
From source file:de.stkl.gbgvertretungsplan.activities.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { if (BuildConfig.DEBUG) Log.d(LOG_TAG, "onCreate"); super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_PROGRESS); supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); //supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY); setContentView(R.layout.activity_main); mNavigationDrawerFragment = (NavigationDrawerFragment) getSupportFragmentManager() .findFragmentById(R.id.navigation_drawer); // Set up the drawer. mNavigationDrawerFragment.setUp(R.id.navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout)); // restore instance state if (savedInstanceState != null) setProgressBarState(savedInstanceState.getBoolean(STATE_PROGRESSBAR_VISIBLE)); // tos//from w ww .ja v a 2 s .co m final Context _this = this; final Eula eula = new Eula(this, new Eula.CallbackInterface() { @Override public void onAccept() { // get default account mDefaultAccount = Authenticator.getDefaultAccount(_this); if (mDefaultAccount == null) { // if no accounts exists, present the account creation activity to the user CreateAccountDialog dialog = new CreateAccountDialog(); dialog.show(getSupportFragmentManager(), "CreateAccountDialog"); } } @Override public void onDecline() { } }); if (eula.mustShow()) eula.show(); else { // get default account mDefaultAccount = Authenticator.getDefaultAccount(this); if (mDefaultAccount == null) { // if no accounts exists, present the account creation activity to the user CreateAccountDialog dialog = new CreateAccountDialog(); dialog.show(getSupportFragmentManager(), "CreateAccountDialog"); } } }
From source file:org.mariotaku.twidere.activity.DirectMessagesActivity.java
@Override public void onCreate(Bundle savedInstanceState) { requestSupportWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); mPreferences = getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE); mService = getTwidereApplication().getServiceInterface(); super.onCreate(savedInstanceState); final Intent intent = getIntent(); final Bundle args = savedInstanceState == null ? intent.getExtras() : savedInstanceState; mAccountId = args != null ? args.getLong(INTENT_KEY_ACCOUNT_ID, -1) : intent.getLongExtra(INTENT_KEY_ACCOUNT_ID, -1); mArguments.clear();/*ww w . ja v a 2s. c o m*/ if (args != null) { mArguments.putAll(args); } mService.clearNotification(NOTIFICATION_ID_DIRECT_MESSAGES); setContentView(R.layout.direct_messages); final ActionBar actionbar = getSupportActionBar(); actionbar.setDisplayShowTitleEnabled(true); actionbar.setDisplayHomeAsUpEnabled(true); final LazyImageLoader imageloader = getTwidereApplication().getProfileImageLoader(); mAdapter = new DirectMessagesEntryAdapter(this, imageloader); mDirectMessagesContainer = findViewById(R.id.direct_messages_content); mAccountSelectContainer = findViewById(R.id.account_select_container); mListView = (ListView) findViewById(android.R.id.list); mAccountConfirmButton = (Button) findViewById(R.id.account_confirm); mAccountConfirmButton.setOnClickListener(this); mAccountSelector = (Spinner) findViewById(R.id.account_selector); mListView.setAdapter(mAdapter); mListView.setOnScrollListener(this); mListView.setOnItemClickListener(this); final long[] activated_ids = getActivatedAccountIds(this); if (!isMyActivatedAccount(this, mAccountId) && activated_ids.length == 1) { mAccountId = activated_ids[0]; } final boolean is_my_activated_account = isMyActivatedAccount(this, mAccountId); if (is_my_activated_account) { mArguments.putLong(INTENT_KEY_ACCOUNT_ID, mAccountId); } mDirectMessagesContainer.setVisibility(is_my_activated_account ? View.VISIBLE : View.GONE); mAccountSelectContainer.setVisibility(!is_my_activated_account ? View.VISIBLE : View.GONE); if (!is_my_activated_account) { mAccountsAdapter = new AccountsAdapter(this); mAccountSelector.setAdapter(mAccountsAdapter); mAccountSelector.setOnItemSelectedListener(this); getSupportLoaderManager().initLoader(LOADER_ID_ACCOUNTS, null, this); } getSupportLoaderManager().initLoader(LOADER_ID_DIRECT_MESSAGES, null, this); }
From source file:com.google.android.demos.atom.app.FeedActivity.java
private void setWindowIndeterminateProgressVisible(boolean value) { getWindow().setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS, value ? Window.PROGRESS_VISIBILITY_ON : Window.PROGRESS_VISIBILITY_OFF); }
From source file:com.momock.holo.app.ActionBarFragmentActivity.java
public void requestSupportWindowFeature(final int featureId) { if (mActionBarCompat instanceof ActionBarCompatNative) { requestWindowFeature(featureId); } else {//from w w w .j ava2 s.c o m switch (featureId) { case Window.FEATURE_INDETERMINATE_PROGRESS: { if (mActionBarCompat instanceof ActionBarCompatBase) { ((ActionBarCompatBase) mActionBarCompat).setProgressBarIndeterminateEnabled(true); } } } } }
From source file:com.afrozaar.jazzfestreporting.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); // Check to see if the proper keys and playlist IDs have been set up if (!isCorrectlyConfigured()) { setContentView(R.layout.developer_setup_required); showMissingConfigurations();//from www.ja va2s . c om } else { setContentView(R.layout.activity_main); ensureFetcher(); credential = GoogleAccountCredential.usingOAuth2(getApplicationContext(), Arrays.asList(Auth.SCOPES)); // set exponential backoff policy credential.setBackOff(new ExponentialBackOff()); if (savedInstanceState != null) { mChosenAccountName = savedInstanceState.getString(ACCOUNT_KEY); } else { loadAccount(); } //mTokenTask = new GetTokenTask(); //mTokenTask.execute(); credential.setSelectedAccountName(mChosenAccountName); mUploadsListFragment = UploadsListFragment.newInstance(mChosenAccountName); getFragmentManager().beginTransaction() .replace(R.id.list_fragment, mUploadsListFragment, "UploadFragment").commit(); Toast.makeText(this, "Account Name: " + mChosenAccountName, Toast.LENGTH_LONG).show(); } }
From source file:org.wheelmap.android.activity.MainMultiPaneActivity.java
@SuppressLint("NewApi") @Override//from ww w. ja v a 2 s . co m public void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); requestWindowFeature(Window.FEATURE_ACTION_BAR); super.onCreate(savedInstanceState); appProperties = new AppProperties(WheelmapApp.getApp()); Log.d(TAG, "onCreate"); setProgressBarIndeterminate(true); setSupportProgressBarIndeterminateVisibility(false); getSupportActionBar().setDisplayShowTitleEnabled(false); getSupportActionBar().setHomeButtonEnabled(false); setContentView(R.layout.activity_multipane); mMovableLayout = (ViewGroup) findViewById(R.id.movable_layout); mResizeButton = (ImageButton) findViewById(R.id.button_movable_resize); ViewGroup g = (ViewGroup) findViewById(R.id.layout_multi); if (Build.VERSION.SDK_INT > 16) { g.getLayoutTransition().disableTransitionType(LayoutTransition.APPEARING); } if (savedInstanceState != null) { executeState(savedInstanceState); } else { executeDefaultInstanceState(); } Bundle extras = getIntent().getExtras(); if (extras.containsKey(Extra.MAP_MODE_ENGAGE)) { mapModeType = MapModeType.MAP_MODE_ENGAGE; } else { mapModeType = MapModeType.MAP_MODE_NORMAL; } ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayShowTitleEnabled(false); mResizeButton.setOnClickListener(this); FragmentManager fm = getSupportFragmentManager(); FragmentTransaction t = fm.beginTransaction(); mWorkerFragment = (CombinedWorkerFragment) fm.findFragmentByTag(CombinedWorkerFragment.TAG); if (mWorkerFragment == null) { mWorkerFragment = new CombinedWorkerFragment(); t.add(mWorkerFragment, CombinedWorkerFragment.TAG); } mListFragment = (POIsListFragment) fm.findFragmentById(R.id.list_layout); if (mListFragment == null) { mListFragment = POIsListFragment.newInstance(false, true); t.add(R.id.list_layout, mListFragment, POIsListFragment.TAG); } mMapFragment = (POIsOsmdroidFragment) fm.findFragmentById(R.id.map_layout); if (mMapFragment == null) { mMapFragment = POIsOsmdroidFragment.newInstance(false, true); t.add(R.id.map_layout, mMapFragment, POIsOsmdroidFragment.TAG); } mDetailFragment = (POIDetailFragment) fm.findFragmentById(R.id.detail_layout); if (mDetailFragment == null) { mDetailFragment = POIDetailFragment.newInstance(); t.add(R.id.detail_layout, mDetailFragment); } t.commit(); WheelmapApp.checkForUpdates(this); app = (WheelmapApp) this.getApplication(); String uri = null; try { address = app.getAddressString(); } catch (Exception ex) { } if (address != null) { showSearch(); } // Show a dialog if meets conditions AppRate.showRateDialogIfMeetsConditions(this); }
From source file:com.arantius.tivocommander.Person.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle bundle = getIntent().getExtras(); if (bundle == null) { Utils.log("Person: null bundle!"); finish();/*from ww w . jav a 2 s. c o m*/ return; } MindRpc.init(this, bundle); mName = bundle.getString("fName"); if (bundle.getString("lName") != null) { mName += " " + bundle.getString("lName"); } mPersonId = bundle.getString("personId"); Utils.log(String.format("Person: " + "name:%s personId:%s", mName, mPersonId)); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.list); MindRpc.addRequest(new PersonSearch(mPersonId), mPersonListener); mOutstandingRequests++; MindRpc.addRequest(new PersonCreditsSearch(mPersonId), mPersonCreditsListener); mOutstandingRequests++; setProgressBarIndeterminateVisibility(true); }