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.mllrsohn.videodialog.VideoDialogPlugin.java
private void playVideo(JSONObject params, final CallbackContext callbackContext) throws JSONException { loopVideo = params.optBoolean("loop", true); path = params.optString("url"); uri = Uri.parse(path);//from w w w .j av a 2s . c o m if (path.contains(ASSETS)) { try { String filepath = path.replace(ASSETS, ""); String filename = filepath.substring(filepath.lastIndexOf("/") + 1, filepath.length()); File fp = new File(this.cordova.getActivity().getFilesDir() + "/" + filename); if (!fp.exists()) { this.copy(filepath, filename); } uri = Uri.parse("file://" + this.cordova.getActivity().getFilesDir() + "/" + filename); } catch (IOException e) { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION)); } } // Create dialog in new thread cordova.getActivity().runOnUiThread(new Runnable() { public void run() { // Set Basic Dialog dialog = new Dialog((Context) cordova.getActivity(), android.R.style.Theme_NoTitleBar_Fullscreen); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setCancelable(true); // Layout View RelativeLayout main = new RelativeLayout((Context) cordova.getActivity()); main.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); // Video View mVideoView = new VideoView((Context) cordova.getActivity()); RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); lp.addRule(RelativeLayout.CENTER_IN_PARENT); mVideoView.setLayoutParams(lp); mVideoView.setVideoPath(uri.toString()); mVideoView.start(); main.addView(mVideoView); dialog.setContentView(main); dialog.getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN); dialog.show(); // Close on touch mVideoView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, "stopped")); dialog.dismiss(); return true; } }); // Set Looping mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { mp.setLooping(loopVideo); } }); // On Completion mVideoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { @Override public void onCompletion(MediaPlayer mediaplayer) { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, "Done")); dialog.dismiss(); } }); } }); }
From source file:palamarchuk.smartlife.app.RegisterActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.register_activity); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); dialogAttachCard = new DialogAttachCard(this); dialogAttachCard.setObtainResultListener(cardNumberResult); cities = new Cities(RegisterActivity.this); email = (EditText) findViewById(R.id.register_activity_email); password = (EditText) findViewById(R.id.register_activity_password); passwordAgain = (EditText) findViewById(R.id.register_activity_password_again); phone = (EditText) findViewById(R.id.register_activity_phone); registerActivitySecret = (EditText) findViewById(R.id.registerActivitySecret); registerActivityCity = (Button) findViewById(R.id.registerActivityCity); registerActivityCity.setOnClickListener(cities); ETcardNumber = (EditText) findViewById(R.id.registerActivityAttachCard); ETcardNumber.setOnClickListener(onCardNumberClick); phone.setText("+7("); phone.addTextChangedListener(new PhoneValidator(phone)); name = (EditText) findViewById(R.id.register_activity_name); // name.setInputType(InputType.TYPE_CLASS_TEXT); // name.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); lastName = (EditText) findViewById(R.id.register_activity_last_name); // lastName.setInputType(InputType.TYPE_CLASS_TEXT); // lastName.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); birthDate = (EditText) findViewById(R.id.register_activity_birthdate); birthDate.setOnTouchListener(new View.OnTouchListener() { @Override// www .jav a 2 s . co m public boolean onTouch(View v, MotionEvent event) { showDialog(DATE_PICKER); return true; } }); birthDate.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { if (hasFocus) showDialog(DATE_PICKER); } }); Button submit = (Button) findViewById(R.id.register_activity_submit); licenseCheckBox = (CheckBox) findViewById(R.id.register_activity_license_agreement); TextView licenseAgreementLink = (TextView) findViewById(R.id.register_activity_license_agreement_link); licenseAgreementLink.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { openUrl(RegisterActivity.this, ServerRequest.LICENSE); } }); // male = (Button) findViewById(R.id.register_activity_male); // female = (Button) findViewById(R.id.register_activity_female); male = (CheckBox) findViewById(R.id.register_activity_checkbox_male); male.setChecked(false); male.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { male.setChecked(true); female.setChecked(false); gender = 1; } }); female = (CheckBox) findViewById(R.id.register_activity_checkbox_female); female.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { female.setChecked(true); male.setChecked(false); gender = 0; } }); sharedPreferences = getSharedPreferences(FragmentHolderActivity.SHARE_PREF_NAME, MODE_PRIVATE); email.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { submit(); } return false; } }); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { submit(); } }); }
From source file:net.evecom.androidecssp.base.BaseActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // /*from w ww . jav a 2s . co m*/ getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); // requestWindowFeature(Window.FEATURE_NO_TITLE); instance = this; db = BaseApplication.instence.db; requestCode.append("sys_code="); requestCode.append(ShareUtil.getString(instance, "PASSNAME", "code", "")); requestCode.append("&sys_imei="); requestCode.append(PhoneUtil.getInstance().getImei(instance)); requestCode.append("&sys_loginName="); requestCode.append(ShareUtil.getString(instance, "PASSNAME", "username", "")); }
From source file:com.android.timezonepicker.TimeZonePickerDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); return dialog; }
From source file:com.ffmpegtest.VideoActivity.java
@Override public void onCreate(Bundle savedInstanceState) { this.getWindow().requestFeature(Window.FEATURE_NO_TITLE); getWindow().setFormat(PixelFormat.RGB_565); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DITHER); super.onCreate(savedInstanceState); this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); this.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); this.getWindow().setBackgroundDrawable(null); this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); if (sIsSurfaceView) this.setContentView(R.layout.video_surfaceview); else//from w w w . j a v a 2 s.c om this.setContentView(R.layout.video_view); mSeekBar = (SeekBar) this.findViewById(R.id.seek_bar); mSeekBar.setOnSeekBarChangeListener(this); mPlayPauseButton = (Button) this.findViewById(R.id.play_pause); mPlayPauseButton.setOnClickListener(this); mScaleButton = this.findViewById(R.id.scale_type); mScaleButton.setOnClickListener(this); mControlsView = this.findViewById(R.id.controls); mStreamsView = this.findViewById(R.id.streams); mLoadingView = this.findViewById(R.id.loading_view); mLanguageSpinner = (Spinner) this.findViewById(R.id.language_spinner); mSubtitleSpinner = (Spinner) this.findViewById(R.id.subtitle_spinner); mLanguageAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, null, PROJECTION, new int[] { android.R.id.text1 }, 0); mLanguageAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); mLanguageSpinner.setAdapter(mLanguageAdapter); mLanguageSpinner.setOnItemSelectedListener(this); mSubtitleAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, null, PROJECTION, new int[] { android.R.id.text1 }, 0); mSubtitleAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); mSubtitleSpinner.setAdapter(mSubtitleAdapter); mSubtitleSpinner.setOnItemSelectedListener(this); mVideoView = this.findViewById(R.id.video_view); ((FFmpegSurfaceView) mVideoView).setScaleType(ScaleType.CENTER_INSIDE, false); mMpegPlayer = new FFmpegPlayer((FFmpegDisplay) mVideoView, this); mMpegPlayer.setMpegListener(this); setDataSource(); }
From source file:com.frublin.androidoauth2.FsDialog.java
private void setUpTitle() { requestWindowFeature(Window.FEATURE_NO_TITLE); Drawable icon = getContext().getResources().getDrawable(R.drawable.foursquareicon); mTitle = new TextView(getContext()); mTitle.setText("Foursquare"); mTitle.setTextColor(Color.WHITE); mTitle.setTypeface(Typeface.DEFAULT_BOLD); mTitle.setBackgroundColor(FS_BLUE);/*from www . j ava2 s . c o m*/ mTitle.setPadding(MARGIN + PADDING, MARGIN, MARGIN, MARGIN); mTitle.setCompoundDrawablePadding(MARGIN + PADDING); mTitle.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null); mContent.addView(mTitle); }
From source file:illab.nabal.proxy.AuthWebDialog.java
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // prepare web view layout mLayout = new LinearLayout(getContext()); mLayout.setOrientation(LinearLayout.VERTICAL); // set up title bar setUpTitle();/* w w w . j a v a 2 s. c om*/ // set up web view setUpWebView(); // determine screen width and height DisplayMetrics displaymetrics = new DisplayMetrics(); getWindow().getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); int screenWidth = displaymetrics.widthPixels; int screenHeight = displaymetrics.heightPixels; // add layout to screen LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams((int) (screenWidth * 0.90), (int) (screenHeight * 0.90)); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(mLayout, layoutParams); }
From source file:com.groupme.sdk.activity.GroupCreateActivity.java
@Override protected Dialog onCreateDialog(int id, Bundle args) { switch (id) { case DIALOG_CREATING: ProgressDialog dialog = new ProgressDialog(this); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setMessage(getString(R.string.dialog_creating_group)); return dialog; default:/*from w w w . j av a2 s .c o m*/ throw new IllegalArgumentException("Unknown dialog id: " + id); } }
From source file:ca.rmen.android.poetassistant.main.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { if (BuildConfig.DEBUG && ActivityManager.isUserAMonkey()) { requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); }/*www . ja v a 2s.co m*/ super.onCreate(savedInstanceState); Log.d(TAG, "onCreate() called with: " + "savedInstanceState = [" + savedInstanceState + "]"); mBinding = DataBindingUtil.setContentView(this, R.layout.activity_main); setSupportActionBar(mBinding.toolbar); Intent intent = getIntent(); Uri data = intent.getData(); mPagerAdapter = new PagerAdapter(this, getSupportFragmentManager(), intent); mPagerAdapter.registerDataSetObserver(mAdapterChangeListener); // Set up the ViewPager with the sections adapter. mBinding.viewPager.setAdapter(mPagerAdapter); mBinding.viewPager.setOffscreenPageLimit(5); mBinding.viewPager.addOnPageChangeListener(mOnPageChangeListener); mBinding.tabs.setupWithViewPager(mBinding.viewPager); AppBarLayoutHelper.enableAutoHide(mBinding); mAdapterChangeListener.onChanged(); // If the app was launched with a query for the a particular tab, focus on that tab. if (data != null && data.getHost() != null) { Tab tab = Tab.parse(data.getHost()); if (tab == null) tab = Tab.DICTIONARY; mBinding.viewPager.setCurrentItem(mPagerAdapter.getPositionForTab(tab)); } else if (Intent.ACTION_SEND.equals(intent.getAction())) { mBinding.viewPager.setCurrentItem(mPagerAdapter.getPositionForTab(Tab.READER)); } mSearch = new Search(this, mBinding.viewPager); loadDictionaries(); setVolumeControlStream(AudioManager.STREAM_MUSIC); }
From source file:br.com.anteros.vendas.gui.ProdutoConsultaDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); /**/*from ww w . ja va 2s . c o m*/ * Remove ttulo da dialog. */ dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); return dialog; }