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:pwr.itapps.meetme.activity.WallActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.activity_main); setProgressBarIndeterminateVisibility(false); mTitle = mDrawerTitle = getTitle();/*ww w. ja va2s . c o m*/ mMenuOptions = getResources().getStringArray(R.array.menu_options); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerList = (ListView) findViewById(R.id.left_drawer); // set a custom shadow that overlays the main content when the drawer // opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); mDrawerList.setAdapter(new ArrayAdapter<String>(this, R.layout.drawer_list_item, mMenuOptions)); mDrawerList.setOnItemClickListener(new DrawerItemClickListener()); getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar().setHomeButtonEnabled(true); getActionBar().setTitle(null); mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close) { public void onDrawerClosed(View view) { getActionBar().setTitle(mTitle); invalidateOptionsMenu(); // creates call to // onPrepareOptionsMenu() } public void onDrawerOpened(View drawerView) { getActionBar().setTitle(mDrawerTitle); invalidateOptionsMenu(); // creates call to // onPrepareOptionsMenu() } }; mDrawerLayout.setDrawerListener(mDrawerToggle); if (savedInstanceState == null) { selectItem(0); } }
From source file:org.wheelmap.android.activity.POIDetailEditableActivity.java
@Override public void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); if (UtilsMisc.isTablet(getApplicationContext())) { UtilsMisc.showAsPopup(this); }/* ww w .j a va2 s . c o m*/ setContentView(R.layout.activity_frame_empty); setSupportProgressBarIndeterminateVisibility(false); if (getSupportActionBar() != null) { getSupportActionBar().setTitle(R.string.title_editor); getSupportActionBar().setDisplayShowTitleEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); } setExternalEditableState(savedInstanceState); FragmentManager fm = getSupportFragmentManager(); fm.addOnBackStackChangedListener(this); mFragment = fm.findFragmentById(R.id.content); if (mFragment != null) { return; } Long poiID = getIntent().getLongExtra(Extra.POI_ID, Extra.ID_UNKNOWN); if (poiID == Extra.ID_UNKNOWN) { Log.w(TAG, "poi id is not given - cant do anything"); return; } int focus = getIntent().getIntExtra("Focus", 0); mFragment = POIDetailEditableFragment.newInstance(poiID, focus); fm.beginTransaction().add(R.id.content, mFragment, POIDetailEditableFragment.TAG).commit(); }
From source file:com.example.android.bluetoothchat.DeviceListActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // ??//from www .ja va2 s.c om requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.activity_device_list); // ????????????CANCELED setResult(Activity.RESULT_CANCELED); // ???????? Button scanButton = (Button) findViewById(R.id.button_scan); scanButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { doDiscovery(); v.setVisibility(View.GONE); } }); //??????? Button startchatButton = (Button) findViewById(R.id.button_start_chat); startchatButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { connect(); } }); // array adapters??. // ?????????????? ArrayAdapter<String> pairedDevicesArrayAdapter = new ArrayAdapter<String>(this, R.layout.device_name); mNewDevicesArrayAdapter = new ArrayAdapter<String>(this, R.layout.device_name); // ????ListView? pairedListView = (ListView) findViewById(R.id.paired_devices); pairedListView.setAdapter(pairedDevicesArrayAdapter); pairedListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); // ????????ListView? ListView newDevicesListView = (ListView) findViewById(R.id.new_devices); newDevicesListView.setAdapter(mNewDevicesArrayAdapter); newDevicesListView.setOnItemClickListener(mDeviceClickListener); // ???? IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND); this.registerReceiver(mReceiver, filter); // ??? filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); this.registerReceiver(mReceiver, filter); // local Bluetooth adapter?? mBtAdapter = BluetoothAdapter.getDefaultAdapter(); // ???? Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices(); // ????????ArrayAdapter?? if (pairedDevices.size() > 0) { findViewById(R.id.title_paired_devices).setVisibility(View.VISIBLE); for (BluetoothDevice device : pairedDevices) { pairedDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress()); } } else { String noDevices = getResources().getText(R.string.none_paired).toString(); pairedDevicesArrayAdapter.add(noDevices); } }
From source file:com.nma.util.sdcardtrac.GraphActivity.java
@Override public void onCreate(Bundle savedInstance) { SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstance); setContentView(R.layout.graph);/* w ww . j a va 2 s .c o m*/ // Setup debug logging SettingsActivity.ENABLE_DEBUG = pref.getBoolean(SettingsActivity.ENABLE_DEBUG_KEY, false); // ActionBar actionBar = getSupportActionBar(); // Add a custom view with a spinner actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.graph_action_bar); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.addTab(actionBar.newTab().setText(TAB_NAME_EXT_STORAGE) .setTabListener(new GraphTabListener(this, TAB_NAME_EXT_STORAGE))); /*Log.d(getClass().getName(), "Creating 2"); actionBar.addTab(actionBar.newTab().setText(TAB_NAME_INT_STORAGE) .setTabListener(new GraphTabListener(this, TAB_NAME_INT_STORAGE)));*/ durationSel = (Spinner) findViewById(R.id.graph_action_bar_spinner); durationSel.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { interval = parent.getItemAtPosition(position).toString(); refreshGraph(true, interval); } @Override public void onNothingSelected(AdapterView<?> parent) { } }); // Help on first showTips = pref.getBoolean(SHOW_HELP_TAG, true); if (showTips) { showHelp(); } // Start service alarmEnabled = pref.getBoolean(SettingsActivity.ALARM_RUNNING_KEY, false); boolean reInst = false; if (savedInstance != null) { Parcelable spinner; reInst = savedInstance.getBoolean(SettingsActivity.ALARM_RUNNING_KEY, false); interval = savedInstance.getString("interval", "Day"); spinner = savedInstance.getParcelable("spinner"); if (spinner != null) durationSel.onRestoreInstanceState(spinner); } if (alarmEnabled && !reInst) { Intent serviceIntent = new Intent(this, FileObserverService.class); serviceIntent.setAction(Intent.ACTION_MAIN); startService(serviceIntent); } }
From source file:com.radicaldynamic.groupinform.activities.AccountDeviceList.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.generic_list); setTitle(getString(R.string.app_name) + " > " + getString(R.string.tf_administer_devices)); }
From source file:org.geometerplus.android.fbreader.network.NetworkCatalogActivity.java
@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); myTree = Util.getTreeFromIntent(getIntent()); if (myTree == null) { finish();/* w w w . j a v a 2 s .co m*/ return; } setForTree(myTree, this); setListAdapter(new CatalogAdapter()); getListView().invalidateViews(); setupTitle(); }
From source file:com.paranoid.gerrit.ProjectsList.java
@Override public void onCreate(Bundle savedInstanceState) { this.setTheme(Prefs.getCurrentThemeID(this)); super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.projects_list); // Action bar Up affordance getActionBar().setDisplayHomeAsUpEnabled(true); mProjectsListView = (ExpandableListView) findViewById(R.id.projects); mProjectsListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() { @Override/*from w w w .jav a2 s .co m*/ public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { TextView tv = (TextView) v; String subgroup = tv.getText().toString(); String root = mListAdapter.getGroupName(groupPosition); setProject(root, subgroup); return true; } }); mProjectsListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() { @Override public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) { TextView tv = (TextView) v; String group = tv.getText().toString(); if (mListAdapter.getChildrenCount(groupPosition) < 1) { setProject(group, ""); return true; } return false; } }); handleIntent(this.getIntent()); receivers = new DefaultGerritReceivers(this); // Todo: We don't always need to query the server here startService(); }
From source file:net.seedboxer.seedroid.activities.MainActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.main_activity_view); // Set up the action bar. final ActionBar actionBar = getActionBar(); // Specify that the Home/Up button should not be enabled, since there is no hierarchical // parent./*from w ww .j a v a 2 s. com*/ actionBar.setHomeButtonEnabled(false); // Specify that we will be displaying tabs in the action bar. actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); mViewPager = (ViewPager) findViewById(R.id.pager); mAppSectionsPagerAdapter = new TabsAdapter(this, getSupportFragmentManager(), mViewPager); mAppSectionsPagerAdapter.addTab(actionBar.newTab().setText(R.string.tab_title_inprogres), StatusFragment.class, null); mAppSectionsPagerAdapter.addTab(actionBar.newTab().setText(R.string.tab_title_queue), InQueueFragment.class, null); mAppSectionsPagerAdapter.addTab(actionBar.newTab().setText(R.string.tab_title_downloads), DownloadsFragment.class, null); if (savedInstanceState != null) { actionBar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); } GCMRegistrar.checkManifest(this); GCMRegistrar.checkDevice(this); }
From source file:edu.berkeley.cellscope.cscore.DeviceListActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Setup the window requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.device_list); // Set result CANCELED in case the user backs out setResult(Activity.RESULT_CANCELED); // Initialize the button to perform device discovery Button scanButton = (Button) findViewById(R.id.button_scan); scanButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { doDiscovery();//w w w . ja v a2s.co m v.setVisibility(View.GONE); } }); // Initialize array adapters. One for already paired devices and // one for newly discovered devices mPairedDevicesArrayAdapter = new ArrayAdapter<String>(this, R.layout.device_name); mNewDevicesArrayAdapter = new ArrayAdapter<String>(this, R.layout.device_name); // Find and set up the ListView for paired devices ListView pairedListView = (ListView) findViewById(R.id.paired_devices); pairedListView.setAdapter(mPairedDevicesArrayAdapter); pairedListView.setOnItemClickListener(mDeviceClickListener); // Find and set up the ListView for newly discovered devices ListView newDevicesListView = (ListView) findViewById(R.id.new_devices); newDevicesListView.setAdapter(mNewDevicesArrayAdapter); newDevicesListView.setOnItemClickListener(mDeviceClickListener); // Register for broadcasts when a device is discovered IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND); this.registerReceiver(mReceiver, filter); // Register for broadcasts when discovery has finished filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); this.registerReceiver(mReceiver, filter); // Get the local Bluetooth adapter mBtAdapter = BluetoothAdapter.getDefaultAdapter(); // Get a set of currently paired devices Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices(); // If there are paired devices, add each one to the ArrayAdapter if (pairedDevices.size() > 0) { findViewById(R.id.title_paired_devices).setVisibility(View.VISIBLE); for (BluetoothDevice device : pairedDevices) { mPairedDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress()); } } else { String noDevices = getResources().getText(R.string.none_paired).toString(); mPairedDevicesArrayAdapter.add(noDevices); } }
From source file:com.bukanir.android.activities.MoviesListActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { Log.d(TAG, "onCreate"); super.onCreate(savedInstanceState); if (!LibsChecker.checkVitamioLibs(this)) { return;// ww w . j ava 2s .c om } if (!Utils.isHttpServiceRunning(this)) { Intent intent = new Intent(this, BukanirHttpService.class); startService(intent); } supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.activity_movie_list); if (findViewById(R.id.movie_container) != null) { twoPane = true; } else { twoPane = false; } if (savedInstanceState != null) { movies = (ArrayList<Movie>) savedInstanceState.getSerializable("movies"); } SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); Boolean eulaAccepted = prefs.getBoolean("eula_accepted", false); if (!eulaAccepted) { new EulaFragment().show(getSupportFragmentManager(), "Eula"); } else { prepareActionBar(); } }