List of usage examples for android.view Window FEATURE_NO_TITLE
int FEATURE_NO_TITLE
To view the source code for android.view Window FEATURE_NO_TITLE.
Click Source Link
From source file:com.mirasense.scanditsdk.plugin.FullScreenPickerActivity.java
@SuppressWarnings("deprecation") private void initializeAndStartBarcodeRecognition(JSONObject settings, Bundle options, Bundle overlayOptions) { // Switch to full screen. getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); if (options.getBoolean("secure")) { getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); }/* w w w . ja va2 s .c o m*/ ScanSettings scanSettings; if (mLegacyMode) { scanSettings = LegacySettingsParamParser.getSettings(options); } else { try { scanSettings = ScanSettings.createWithJson(settings); } catch (JSONParseException e) { Log.e("ScanditSDK", "Exception when creating settings"); e.printStackTrace(); scanSettings = ScanSettings.create(); } } BarcodePickerWithSearchBar picker = new BarcodePickerWithSearchBar(this, scanSettings); picker.setOnScanListener(this); this.setContentView(picker); mPickerStateMachine = new PickerStateMachine(picker, this); // Set all the UI options. PhonegapParamParser.updatePicker(picker, options, this); // Check buffered torch state and apply if needed. if (sBufferedTorchEnabled.compareAndSet(true, false)) { picker.switchTorchOn(true); } if (mLegacyMode) { assert settings == null; LegacyUIParamParser.updatePickerUI(this, picker, options); } else { UIParamParser.updatePickerUI(picker, overlayOptions); PhonegapParamParser.updatePicker(picker, overlayOptions, this); } mContinuousMode = PhonegapParamParser.shouldRunInContinuousMode(options); mStateBeforeSuspend = PhonegapParamParser.shouldStartInPausedState(options) ? PickerStateMachine.PAUSED : PickerStateMachine.ACTIVE; }
From source file:com.android.music.AlbumBrowserActivity.java
/** Called when the activity is first created. */ @Override//from w w w . j a v a 2s . co m public void onCreate(Bundle icicle) { if (icicle != null) { mCurrentAlbumId = icicle.getString("selectedalbum"); mArtistId = icicle.getString("artist"); } else { mArtistId = getIntent().getStringExtra("artist"); } super.onCreate(icicle); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); requestWindowFeature(Window.FEATURE_NO_TITLE); setVolumeControlStream(AudioManager.STREAM_MUSIC); mToken = MusicUtils.bindToService(this, this); IntentFilter f = new IntentFilter(); f.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED); f.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED); f.addAction(Intent.ACTION_MEDIA_UNMOUNTED); f.addDataScheme("file"); registerReceiver(mScanListener, f); setContentView(R.layout.media_picker_activity); MusicUtils.updateButtonBar(this, R.id.albumtab); ListView lv = getListView(); lv.setOnCreateContextMenuListener(this); lv.setTextFilterEnabled(true); mAdapter = (AlbumListAdapter) getLastNonConfigurationInstance(); if (mAdapter == null) { //Log.i("@@@", "starting query"); mAdapter = new AlbumListAdapter(getApplication(), this, R.layout.track_list_item, mAlbumCursor, new String[] {}, new int[] {}); setListAdapter(mAdapter); setTitle(R.string.working_albums); getAlbumCursor(mAdapter.getQueryHandler(), null); } else { mAdapter.setActivity(this); setListAdapter(mAdapter); mAlbumCursor = mAdapter.getCursor(); if (mAlbumCursor != null) { init(mAlbumCursor); } else { getAlbumCursor(mAdapter.getQueryHandler(), null); } } badSymptoms = new BadSymptoms(this); }
From source file:br.com.anteros.vendas.gui.ClienteConsultaDialog.java
/** * Cria uma janela para a consulta dos clientes * @param savedInstanceState//www .j av a 2s .co m * @return */ @Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); /** * Remove o ttulo da dialog. */ dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); return dialog; }
From source file:sjizl.com.FileUploadTest2.java
@SuppressLint("NewApi") @Override//w w w . j a v a2 s .co m public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.fileuploadtest2); //ac_image_grid TextView textView2_under_title; final ImageLoader imageLoader = ImageLoader.getInstance(); imageLoader.init(ImageLoaderConfiguration.createDefault(getApplicationContext())); progressBar_hole = (ProgressBar) findViewById(R.id.progressBar_hole); progressBar_hole.setVisibility(View.INVISIBLE); right_lin = (LinearLayout) findViewById(R.id.right_lin); middle_lin = (LinearLayout) findViewById(R.id.middle_lin); //right_lin.setBackgroundColor(Color.BLUE); right_lin = (LinearLayout) findViewById(R.id.right_lin); left_lin1 = (LinearLayout) findViewById(R.id.left_lin1); left_lin3 = (LinearLayout) findViewById(R.id.left_lin3); left_lin4 = (LinearLayout) findViewById(R.id.left_lin4); middle_lin = (LinearLayout) findViewById(R.id.middle_lin); textView2_under_title = (TextView) findViewById(R.id.textView2_under_title); ((LinearLayout) textView2_under_title.getParent()).removeView(textView2_under_title); textView2_under_title.setVisibility(View.GONE); ImageView imageView2_dashboard = (ImageView) findViewById(R.id.imageView2_dashboard); if (android.os.Build.VERSION.SDK_INT > 9) { StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); } Button upload_photo0 = (Button) findViewById(R.id.upload_photo0); Button upload_photo1 = (Button) findViewById(R.id.upload_photo1); Button upload_photo2 = (Button) findViewById(R.id.upload_photo2); upload_photo0.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(), "UploadActivity!", Toast.LENGTH_LONG).show(); Intent dashboard = new Intent(getApplicationContext(), UploadActivity.class); startActivity(dashboard); } }); upload_photo1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(), "FileChooserExampleActivity!", Toast.LENGTH_LONG).show(); Intent dashboard = new Intent(getApplicationContext(), FileChooserExampleActivity.class); startActivity(dashboard); } }); upload_photo2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(), "FileChooserExampleActivity!", Toast.LENGTH_LONG).show(); Intent dashboard = new Intent(getApplicationContext(), FileChooserExampleActivity.class); startActivity(dashboard); } }); final ImageView left_button; left_button = (ImageView) findViewById(R.id.imageView1_back); Brows(); listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { //startImagePagerActivity(position); Intent dashboard = new Intent(getApplicationContext(), ProfileActivity.class); dashboard.putExtra("user", naam); dashboard.putExtra("user_foto", foto); dashboard.putExtra("user_foto_num", foto_num); startActivity(dashboard); } }); CommonUtilities u = new CommonUtilities(); u.setHeaderConrols(getApplicationContext(), this, right_lin, left_lin3, left_lin4, left_lin1, left_button); ; }
From source file:biz.easymenu.easymenung.LoginFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { v = li.inflate(R.layout.logindialog, container, false); WindowManager.LayoutParams WMLP = this.getDialog().getWindow().getAttributes(); adultsNb = (NumberPicker) v.findViewById(R.id.adultnumpick); childrenNb = (NumberPicker) v.findViewById(R.id.childrennumpick); etPass = (EditText) v.findViewById(R.id.loginPass); pbar = (ProgressBar) v.findViewById(R.id.pBarLogin); btnOk = (Button) v.findViewById(R.id.lgnbtnOK); btnCancel = (Button) v.findViewById(R.id.lgnbtnCancel); btnDiners = (Button) v.findViewById(R.id.lgndinersbtnOK); btnDiners.setOnClickListener(new View.OnClickListener() { @Override//from ww w. j a va2s. c o m public void onClick(View v) { new Thread(new DinersRun()).start(); } }); btnOk.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { pbar.setVisibility(View.VISIBLE); new Thread(new NewSessionRun()).start(); } }); btnCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); WMLP.y = 100; //y position WMLP.gravity = Gravity.TOP; WMLP.windowAnimations = R.style.PauseDialogAnimation; this.getDialog().getWindow().setAttributes(WMLP); this.getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE); //this.getDialog().getWindow().getAttributes().windowAnimations = R.style.PauseDialogAnimation; spin = (AutoCompleteTextView) v.findViewById(R.id.spinnerLogin); adapter = new ArrayAdapter<String>(getActivity(), R.layout.autocompleteview, items); spin.setAdapter(adapter); spin.addTextChangedListener(new TextWatcher() { public void onTextChanged(CharSequence s, int start, int before, int count) { if (count == 1 && start == 0) { pbar.setVisibility(View.VISIBLE); new Thread(new LoadItemsRun()).start(); } } public void beforeTextChanged(CharSequence s, int start, int count, int after) { // TODO Auto-generated method stub } public void afterTextChanged(Editable s) { } }); return v; }
From source file:com.scandit.simplesample.SimpleSampleActivity.java
/** * Initializes and starts the bar code scanning. */// w w w. ja v a 2s .c om public void initializeAndStartBarcodeScanning() { // Switch to full screen. getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); // The scanning behavior of the barcode picker is configured through scan // settings. We start with empty scan settings and enable a very generous // set of symbologies. In your own apps, only enable the symbologies you // actually need. ScanSettings settings = ScanSettings.create(); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_EAN13, true); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_UPCA, true); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_EAN8, true); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_UPCE, true); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_QR, true); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_DATA_MATRIX, true); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_CODE39, true); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_CODE128, true); settings.setSymbologyEnabled(Barcode.SYMBOLOGY_INTERLEAVED_2_OF_5, true); settings.setCameraFacingPreference(ScanSettings.CAMERA_FACING_BACK); // Some Android 2.3+ devices do not support rotated camera feeds. On these devices, the // barcode picker emulates portrait mode by rotating the scan UI. boolean emulatePortraitMode = !BarcodePicker.canRunPortraitPicker(); if (emulatePortraitMode) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } BarcodePicker picker = new BarcodePicker(this, settings); setContentView(picker); mBarcodePicker = picker; // Register listener, in order to be notified about relevant events // (e.g. a successfully scanned bar code). mBarcodePicker.setOnScanListener(this); }
From source file:com.andrew.apollo.ui.activities.SearchActivity.java
/** * {@inheritDoc}/* w w w . java2 s.c o m*/ */ @SuppressWarnings("deprecation") @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Title bar shows up in gingerbread, I'm too tired to figure out why. if (!ApolloUtils.hasHoneycomb()) { requestWindowFeature(Window.FEATURE_NO_TITLE); } // Initialze the theme resources mResources = new ThemeUtils(this); // Set the overflow style mResources.setOverflowStyle(this); // Fade it in overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); // Control the media volume setVolumeControlStream(AudioManager.STREAM_MUSIC); // Bind Apollo's service mToken = MusicUtils.bindToService(this, this); // Theme the action bar final ActionBar actionBar = getSupportActionBar(); mResources.themeActionBar(actionBar, getString(R.string.app_name)); actionBar.setDisplayHomeAsUpEnabled(true); // Set the layout setContentView(R.layout.grid_base); // Give the background a little UI final FrameLayout background = (FrameLayout) findViewById(R.id.grid_base_container); background.setBackgroundDrawable(getResources().getDrawable(R.drawable.pager_background)); // Get the query final String query = getIntent().getStringExtra(SearchManager.QUERY); mFilterString = !TextUtils.isEmpty(query) ? query : null; // Action bar subtitle mResources.setSubtitle("\"" + mFilterString + "\""); // Initialize the adapter mAdapter = new SearchAdapter(this); // Set the prefix mAdapter.setPrefix(mFilterString); // Initialze the list mGridView = (GridView) findViewById(R.id.grid_base); // Bind the data mGridView.setAdapter(mAdapter); // Recycle the data mGridView.setRecyclerListener(new RecycleHolder()); // Seepd up scrolling mGridView.setOnScrollListener(this); mGridView.setOnItemClickListener(this); if (ApolloUtils.isLandscape(this)) { mGridView.setNumColumns(TWO); } else { mGridView.setNumColumns(ONE); } // Prepare the loader. Either re-connect with an existing one, // or start a new one. getSupportLoaderManager().initLoader(0, null, this); }
From source file:se.anyro.tagtider.TransferActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.transfer);//from w w w. ja va 2 s . co m // Use c2dm if we have Android 2.2 int sdkVersion = Integer.parseInt(Build.VERSION.SDK); // Cupcake style if (sdkVersion >= Build.VERSION_CODES.FROYO + 10) { // TODO: Change when we want to use C2DM findViewById(R.id.sms).setVisibility(View.GONE); } else { //TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); mPhoneNumber = null; // tm.getLine1Number(); TODO: Change when server supports this if (mPhoneNumber != null && mPhoneNumber.length() == 0) mPhoneNumber = null; findViewById(R.id.c2dm).setVisibility(View.GONE); } mProgressBar = findViewById(R.id.progress); setupTransferData(getIntent().getExtras()); setupDialogs(); if (!mTransferId.equals(sLastTransferId)) { sLastUpdate = 0; sLastTransferId = mTransferId; } }
From source file:eu.sathra.SathraActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mCurrentSathra = this; mWasInitiated = false;/*from w w w . j a v a 2 s . c o m*/ ResourceManager.getInstance().unloadAll(); mParams = getParameters(); if (mParams.fullscreen) { requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } if (mParams.layout == 0) { mSurfaceView = new GLSurfaceView(this); setContentView(mSurfaceView); } else { setContentView(mParams.layout); mSurfaceView = (GLSurfaceView) findViewById(R.id.surface); } mSurfaceView.setRenderer(this); mSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT); mSurfaceView.setPreserveEGLContextOnPause(true); // resize view to forced resolution if (mParams.width != 0 && mParams.height != 0) mSurfaceView.getHolder().setFixedSize(mParams.width, mParams.height); SathraAdapter adapter = new SathraAdapter(); IO.getInstance().registerAdapter(SathraActivity.class, adapter); IO.getInstance().registerAdapter(Context.class, adapter); mIsRunning = true; // setup FPS view showFPS(mParams.showFPS); setTimeScale(1); setAmbientColor(mParams.ambientColor); setRequestedOrientation( mParams.orientation == Orientation.VERTICAL ? ActivityInfo.SCREEN_ORIENTATION_PORTRAIT : ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); // new CameraNode(this, null, null, true, null, null, null, null); // mRootNode.addChild(CameraNode.getActiveCamera()); }
From source file:com.cyanogenmod.messaging.quickmessage.QuickMessagePopup.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Initialise the message list and other variables mContext = this; mMessageList = new ArrayList<QuickMessage>(); mUnicodeFilter = PrefsUtils.getUnicodeFilterIfEnabled(); mCloseClosesAll = PrefsUtils.isQuickMessagingCloseAllEnabled(); // Set the window features and layout requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.dialog_quickmessage); // Turn on the Options Menu invalidateOptionsMenu();//from ww w .j av a2s .c om // Load the views and Parse the intent to show the QuickMessage setupViews(); parseIntent(getIntent().getExtras(), false); }