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:org.jfedor.nxtremotecontrol.ChooseDeviceActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.device_list); setResult(Activity.RESULT_CANCELED); Button scanButton = (Button) findViewById(R.id.button_scan); scanButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { doDiscovery();//from w w w .ja v a2 s . c o m v.setVisibility(View.GONE); } }); mPairedDevicesArrayAdapter = 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(mPairedDevicesArrayAdapter); pairedListView.setOnItemClickListener(mDeviceClickListener); 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); mBtAdapter = BluetoothAdapter.getDefaultAdapter(); Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices(); boolean empty = true; if (pairedDevices.size() > 0) { for (BluetoothDevice device : pairedDevices) { if ((device.getBluetoothClass() != null) && (device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.TOY_ROBOT)) { mPairedDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress()); empty = false; } } } if (!empty) { findViewById(R.id.title_paired_devices).setVisibility(View.VISIBLE); findViewById(R.id.no_devices).setVisibility(View.GONE); } if (checkPlayService()) { Intent intent = new Intent(this, RegistrationIntentService.class); startService(intent); } }
From source file:com.google.developers.actions.debugger.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mActionsListFragment = (ActionsListFragment) getFragmentManager().findFragmentById(R.id.list_fragment); loadActions();/* w w w . j a v a 2s . c o m*/ }
From source file:com.google.android.demos.jamendo.app.AlbumGalleryActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.jamendo_gallery); mGallery = (Gallery) findViewById(android.R.id.list); mTextAlbumName = (TextView) findViewById(R.id.text1); mTextArtistName = (TextView) findViewById(R.id.text2); mTextAlbumGenre = (TextView) findViewById(R.id.text3); Resources resources = getResources(); mImageSize = resources.getDimensionPixelSize(R.dimen.gallery_size); AlbumDetailsObserver albumDetailsObserver = new AlbumDetailsObserver(); mAdapter = new AlbumGalleryAdapter(this); mAdapter.registerDataSetObserver(albumDetailsObserver); mAlbums = new Loadable(getSupportLoaderManager(), LOADER_ALBUMS, new StatusViewManager(this, LOADER_ALBUMS, this, this)); mGallery.setAdapter(new GalleryDecorator(mAdapter, this)); mGallery.setOnItemClickListener(this); mGallery.setOnItemSelectedListener(new CompositeOnItemSelectedListener(albumDetailsObserver, mAdapter, new GalleryScrollListener(mAlbums))); mAlbums.init();/*from w w w .ja v a 2 s. com*/ }
From source file:org.codecyprus.android_client.ui.ActivityStartQuiz.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.activity_start_quiz); category = (Category) getIntent().getSerializableExtra(EXTRA_CATEGORY); final TextView bubbleTextView = (TextView) findViewById(R.id.activity_start_quiz_text_view_bubble); bubbleTextView.setText(getString(R.string.Team_names_and_emails, category.getName())); findViewById(R.id.activity_start_quiz_button_add_second_pirate) .setOnClickListener(new View.OnClickListener() { @Override// www.j a v a 2 s .c om public void onClick(View v) { hasSecondPirate = true; findViewById(R.id.activity_start_quiz_button_add_second_pirate).setVisibility(View.GONE); findViewById(R.id.activity_start_quiz_second_pirate_container).setVisibility(View.VISIBLE); } }); findViewById(R.id.activity_start_quiz_button_remove_second_pirate) .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { hasSecondPirate = false; findViewById(R.id.activity_start_quiz_button_add_second_pirate).setVisibility(View.VISIBLE); findViewById(R.id.activity_start_quiz_second_pirate_container).setVisibility(View.GONE); } }); submitButton = (Button) findViewById(R.id.activity_start_quiz_button_start); submitButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { submitButton.setEnabled(false); startQuiz(); } }); teamNameEditText = (EditText) findViewById(R.id.activity_start_quiz_team_name); pirate1NameEditText = (EditText) findViewById(R.id.activity_start_quiz_pirate1_name); pirate1EmailEditText = (EditText) findViewById(R.id.activity_start_quiz_pirate1_email); pirate2NameEditText = (EditText) findViewById(R.id.activity_start_quiz_pirate2_name); pirate2EmailEditText = (EditText) findViewById(R.id.activity_start_quiz_pirate2_email); progressReceiver = new ProgressReceiver(); }
From source file:com.techjoynt.android.nxt.activity.RemoteControl.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.activity_main); setSupportProgressBarIndeterminateVisibility(true); content = findViewById(android.R.id.content); content.setKeepScreenOn(true);//from w ww . j a v a2 s . c om run(); if (mBluetoothAdapter != null) { if (mBluetoothAdapter.isEnabled()) { checkForDefault(); } } }
From source file:com.prasanna.android.stacknetwork.UserProfileActivity.java
@Override public void onCreate(android.os.Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); site = (Site) getIntent().getSerializableExtra(StringConstants.SITE); super.onCreate(savedInstanceState); setContentView(R.layout.viewpager_title_indicator); profileViewPageAdapter = new ProfileViewPageAdapter(getFragmentManager()); viewPager = (ViewPager) findViewById(R.id.viewPager); viewPager.setAdapter(profileViewPageAdapter); TitlePageIndicator indicator = (TitlePageIndicator) findViewById(R.id.indicator); indicator.setViewPager(viewPager);/*from w ww . jav a 2 s.c o m*/ }
From source file:org.mariotaku.twidere.activity.AuthorizeActivity.java
@Override public void onCreate(final Bundle savedInstanceState) { requestSupportWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); final Bundle extras = getIntent().getExtras(); if (extras == null) { finish();//from w ww .j a v a 2s . c om return; } mPreferences = getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE); setContentView(mWebView = new WebView(this)); getSupportActionBar().setDisplayHomeAsUpEnabled(true); mWebView.setWebViewClient(new AuthorizationWebViewClient()); mWebView.setVerticalScrollBarEnabled(false); mWebSettings = mWebView.getSettings(); mWebSettings.setLoadsImagesAutomatically(true); mWebSettings.setJavaScriptEnabled(true); mWebSettings.setBlockNetworkImage(false); mWebSettings.setSaveFormData(true); mWebSettings.setSavePassword(true); getRequestToken(); }
From source file:org.anhonesteffort.flock.ManageSubscriptionActivity.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_manage_subscription); if (savedInstanceState != null && !savedInstanceState.isEmpty()) { if (!DavAccount.build(savedInstanceState.getBundle(KEY_DAV_ACCOUNT_BUNDLE)).isPresent()) { Log.e(TAG, "where did my dav account bundle go?! :("); finish();/*from www. j a v a 2s .c o m*/ return; } davAccount = DavAccount.build(savedInstanceState.getBundle(KEY_DAV_ACCOUNT_BUNDLE)).get(); currentFragment = savedInstanceState.getInt(KEY_CURRENT_FRAGMENT, -1); activityRequestCode = Optional.fromNullable(savedInstanceState.getInt(KEY_REQUEST_CODE)); activityResultCode = Optional.fromNullable(savedInstanceState.getInt(KEY_RESULT_CODE)); activityResultData = Optional.fromNullable((Intent) savedInstanceState.getParcelable(KEY_RESULT_DATA)); } else if (getIntent().getExtras() != null) { if (!DavAccount.build(getIntent().getExtras().getBundle(KEY_DAV_ACCOUNT_BUNDLE)).isPresent()) { Log.e(TAG, "where did my dav account bundle go?! :("); finish(); return; } davAccount = DavAccount.build(getIntent().getExtras().getBundle(KEY_DAV_ACCOUNT_BUNDLE)).get(); currentFragment = getIntent().getExtras().getInt(KEY_CURRENT_FRAGMENT, -1); activityRequestCode = Optional.fromNullable(getIntent().getExtras().getInt(KEY_REQUEST_CODE)); activityResultCode = Optional.fromNullable(getIntent().getExtras().getInt(KEY_RESULT_CODE)); activityResultData = Optional .fromNullable((Intent) getIntent().getExtras().getParcelable(KEY_RESULT_DATA)); } Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND"); serviceIntent.setPackage("com.android.vending"); bindService(serviceIntent, serviceConnection, Context.BIND_AUTO_CREATE); }
From source file:org.wheelmap.android.activity.POIDetailActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); Log.d(TAG, "onCreate"); getSupportActionBar().setDisplayShowTitleEnabled(false); setSupportProgressBarIndeterminateVisibility(false); getSupportActionBar().setHomeButtonEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); FragmentManager fm = getSupportFragmentManager(); mFragment = (POIDetailFragment) fm.findFragmentByTag(POIDetailFragment.TAG); }
From source file:eu.masconsult.bgbanking.activity.HomeActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); trackReferrer();// w w w.j a v a 2 s .com accountManager = AccountManager.get(this); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); getSupportActionBar().setDisplayShowTitleEnabled(false); getSupportActionBar().setIcon(R.drawable.ic_icon); }