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.android.music.MediaPlaybackActivity.java
/** Called when the activity is first created. */ @Override/* ww w . j a va 2 s.c o m*/ public void onCreate(Bundle icicle) { super.onCreate(icicle); setVolumeControlStream(AudioManager.STREAM_MUSIC); mAlbumArtWorker = new Worker("album art worker"); mAlbumArtHandler = new AlbumArtHandler(mAlbumArtWorker.getLooper()); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.audio_player); mCurrentTime = (TextView) findViewById(R.id.currenttime); mTotalTime = (TextView) findViewById(R.id.totaltime); mProgress = (ProgressBar) findViewById(android.R.id.progress); mAlbum = (ImageView) findViewById(R.id.album); mArtistName = (TextView) findViewById(R.id.artistname); mAlbumName = (TextView) findViewById(R.id.albumname); mTrackName = (TextView) findViewById(R.id.trackname); View v = (View) mArtistName.getParent(); v.setOnTouchListener(this); v.setOnLongClickListener(this); v = (View) mAlbumName.getParent(); v.setOnTouchListener(this); v.setOnLongClickListener(this); v = (View) mTrackName.getParent(); v.setOnTouchListener(this); v.setOnLongClickListener(this); mPrevButton = (RepeatingImageButton) findViewById(R.id.prev); mPrevButton.setOnClickListener(mPrevListener); mPrevButton.setRepeatListener(mRewListener, 260); mPauseButton = (ImageButton) findViewById(R.id.pause); mPauseButton.requestFocus(); mPauseButton.setOnClickListener(mPauseListener); mNextButton = (RepeatingImageButton) findViewById(R.id.next); mNextButton.setOnClickListener(mNextListener); mNextButton.setRepeatListener(mFfwdListener, 260); seekmethod = 1; mDeviceHasDpad = (getResources().getConfiguration().navigation == Configuration.NAVIGATION_DPAD); mQueueButton = (ImageButton) findViewById(R.id.curplaylist); mQueueButton.setOnClickListener(mQueueListener); mShuffleButton = ((ImageButton) findViewById(R.id.shuffle)); mShuffleButton.setOnClickListener(mShuffleListener); mRepeatButton = ((ImageButton) findViewById(R.id.repeat)); mRepeatButton.setOnClickListener(mRepeatListener); if (mProgress instanceof SeekBar) { SeekBar seeker = (SeekBar) mProgress; seeker.setOnSeekBarChangeListener(mSeekListener); } mProgress.setMax(1000); mTouchSlop = ViewConfiguration.get(this).getScaledTouchSlop(); badSymptoms = new BadSymptoms(this); }
From source file:com.njlabs.amrita.aid.aums.AumsActivity.java
@Override public void init(Bundle savedInstanceState) { setupLayout(R.layout.activity_aums, Color.parseColor("#e91e63")); rollNoEditText = (EditText) findViewById(R.id.roll_no); passwordEditText = (EditText) findViewById(R.id.pwd); List<String> campusDataSet = new LinkedList<>(Arrays.asList("Ettimadai", "Amritapuri", "Bangalore", "Mysore", "AIMS", "Business schools", "ASAS Kochi")); spinner = (MaterialSpinner) findViewById(R.id.spinner); spinner.setItems(campusDataSet);/*w w w .j ava 2 s.com*/ AlertDialog.Builder builder = new AlertDialog.Builder(baseContext); builder.setMessage("Amrita University does not provide an API for accessing AUMS data. " + "So, if any changes are made to the AUMS Website, please be patient while I try to catch up.") .setCancelable(true).setIcon(R.drawable.ic_action_info_small) .setPositiveButton("Got it !", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); hideSoftKeyboard(); } }); AlertDialog alert = builder.create(); alert.requestWindowFeature(Window.FEATURE_NO_TITLE); alert.show(); dialog = new ProgressDialog(baseContext); dialog.setIndeterminate(true); dialog.setCancelable(false); dialog.setInverseBackgroundForced(false); dialog.setCanceledOnTouchOutside(false); dialog.setMessage("Authenticating your credentials ... "); aumsPreferences = getSharedPreferences("aums_prefs", Context.MODE_PRIVATE); String rollNo = aumsPreferences.getString("RollNo", ""); String encodedPassword = aumsPreferences.getString("Password", ""); spinner.setSelectedIndex(aumsPreferences.getInt("server_ordinal", 0)); aums = new Aums(baseContext); if (!rollNo.equals("")) { ((EditText) findViewById(R.id.roll_no)).setText(rollNo); aums.studentRollNo = rollNo; hideSoftKeyboard(); } if (!encodedPassword.equals("")) { ((EditText) findViewById(R.id.pwd)).setText(Security.decrypt(encodedPassword, MainApplication.key)); hideSoftKeyboard(); } }
From source file:com.apptentive.android.sdk.module.messagecenter.view.AttachmentPreviewDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); dialog.getWindow().getAttributes().windowAnimations = R.style.ApptentiveDialogAnimation; dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); lp.copyFrom(dialog.getWindow().getAttributes()); lp.gravity = Gravity.BOTTOM;/*from w ww.ja v a2s . c om*/ lp.width = WindowManager.LayoutParams.MATCH_PARENT; lp.height = WindowManager.LayoutParams.MATCH_PARENT; dialog.getWindow().setAttributes(lp); return dialog; }
From source file:com.bitants.wally.fragments.MaterialDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { if (getActivity() != null) { final Dialog dialog = new Dialog(getActivity(), android.support.v7.appcompat.R.style.Base_Theme_AppCompat_Light_Dialog); // android.R.style.Theme_DeviceDefault_Light_Dialog); dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); dialog.setContentView(R.layout.dialog_base_material); textViewTitle = (TextView) dialog.findViewById(R.id.dialog_title); buttonNegative = (Button) dialog.findViewById(R.id.dialog_button_negative); buttonPositive = (Button) dialog.findViewById(R.id.dialog_button_positive); scrollView = (ScrollView) dialog.findViewById(R.id.dialog_scrollview); viewStub = (ViewStub) dialog.findViewById(R.id.dialog_viewstub); setupViews(dialog.getContext()); hideEmptyViews();//w w w . ja v a2 s . c o m if (!isCancelable()) { buttonNegative.setVisibility(View.GONE); } return dialog; } else { return null; } }
From source file:com.example.gangzhang.myapplication.VideoPlayerActivity.java
/** * * Called when the activity is first created. *///from w w w . j a v a 2 s . co m @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Log.d(TAG, "onCreate"); requestWindowFeature(Window.FEATURE_NO_TITLE);//?? Vitamio.isInitialized(this.getApplicationContext()); setContentView(R.layout.videoview); mPreview = (SurfaceView) findViewById(R.id.surface); mPreview.setClickable(false); holder = mPreview.getHolder(); holder.addCallback(this); holder.setFormat(PixelFormat.RGBA_8888); mProgressBar = (ImageView) findViewById(R.id.loading); mPlayImageView = (ImageView) findViewById(R.id.play); mPlayImageView.setOnClickListener(this); mImageCapture = (Button) findViewById(R.id.capture); mImageCapture.setOnClickListener(this); mImageCapture.setEnabled(false); mImageRecord = (Button) findViewById(R.id.record); mImageRecord.setOnClickListener(this); extras = getIntent().getExtras(); operatingAnim = AnimationUtils.loadAnimation(this, R.anim.loading_anim); LinearInterpolator lin = new LinearInterpolator(); operatingAnim.setInterpolator(lin); sp = getSharedPreferences(SettingFragment.KEY_SETTING, PreferenceActivity.MODE_PRIVATE); hardEnabled = sp.getBoolean(SettingFragment.KEY_HARD_DECODER, false); // byte[] bt= new byte[]{}; // load(); // initH264(bt); }
From source file:com.dmsl.anyplace.SelectBuildingActivity.java
/** Called when the activity is first created. */ @Override/* ww w . j a va2 s . com*/ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature((int) Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_select_building); // get the AnyplaceCache instance mAnyplaceCache = AnyplaceCache.getInstance(this); btnRefreshWorldBuildings = (Button) findViewById(R.id.btnWorldBuildingsRefresh); btnRefreshWorldBuildings.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (isBuildingsJobRunning) { Toast.makeText(getBaseContext(), "Another building request is in process...", Toast.LENGTH_SHORT).show(); return; } startBuildingsFetch(false, true); } }); btnRefreshNearmeBuildings = (Button) findViewById(R.id.btnNearmeBuildingsRefresh); btnRefreshNearmeBuildings.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (isBuildingsJobRunning) { Toast.makeText(getBaseContext(), "Another building request is in process...", Toast.LENGTH_SHORT).show(); return; } startBuildingsFetch(true, false); } }); spinnerFloors = (Spinner) findViewById(R.id.floors); spinnerFloors.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { selectedFloorIndex = pos; } @Override public void onNothingSelected(AdapterView<?> parent) { } }); spinnerBuildings = (Spinner) findViewById(R.id.buildings); spinnerBuildings.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { if (isFloorsJobRunning) { Toast.makeText(getBaseContext(), "Another request is in process...", Toast.LENGTH_SHORT).show(); return; } mAnyplaceCache.setSelectedBuildingIndex(pos); BuildingModel build = mAnyplaceCache.getSelectedBuilding(); if (build != null && build.isFloorsLoaded()) { setFloorSpinner(build.getFloors()); try { spinnerFloors.setSelection(build.getSelectedFloorIndex()); } catch (IndexOutOfBoundsException ex) { } onFloorsLoaded(build.getFloors()); } else { startFloorFetch(); } } @Override public void onNothingSelected(AdapterView<?> parent) { } }); btnRefreshFloors = (Button) findViewById(R.id.btnFloorsRefresh); btnRefreshFloors.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (isFloorsJobRunning) { Toast.makeText(getBaseContext(), "Another floor request is in process...", Toast.LENGTH_SHORT) .show(); return; } try { startFloorFetch(); } catch (IndexOutOfBoundsException ex) { Toast.makeText(getBaseContext(), "Check again the building selected...", Toast.LENGTH_SHORT) .show(); } } }); Button done = (Button) findViewById(R.id.btnDone); done.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startFloorPlanTask(); } }); Bundle b = this.getIntent().getExtras(); if (b == null) { mode = Mode.NONE; lat = "0.0"; lon = "0.0"; } else { mode = (Mode) b.getSerializable("mode"); if (mode == null) mode = Mode.NONE; lat = b.getString("coordinates_lat"); if (lat == null) { lat = "0.0"; mode = Mode.NONE; btnRefreshNearmeBuildings.setEnabled(false); } lon = b.getString("coordinates_lon"); if (lon == null) { lon = "0.0"; mode = Mode.NONE; btnRefreshNearmeBuildings.setEnabled(false); } } // start automatically the buildings task if invisible mode if (mode != Mode.NONE) { floorSelectorDialog = new ProgressDialog(SelectBuildingActivity.this); floorSelectorDialog.setIndeterminate(true); floorSelectorDialog.setTitle("Detecting floor"); floorSelectorDialog.setMessage("Please be patient..."); floorSelectorDialog.setCancelable(true); floorSelectorDialog.setCanceledOnTouchOutside(false); floorSelector = new Algo1Server(getApplicationContext()); floorSelector.addListener((FloorSelector.FloorAnyplaceFloorListener) this); floorSelector.addListener((FloorSelector.ErrorAnyplaceFloorListener) this); isBuildingsLoadingFinished = false; isfloorSelectorJobFinished = false; floorSelector.Start(lat, lon); startBuildingsFetch(true, false); } else { List<BuildingModel> buildings = mAnyplaceCache.getSpinnerBuildings(); if (buildings.size() == 0) { startBuildingsFetch(false, false); } else { setBuildingSpinner(buildings); spinnerBuildings.setSelection(mAnyplaceCache.getSelectedBuildingIndex()); } } }
From source file:com.door43.translationstudio.ui.dialogs.BackupDialog.java
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE); v = inflater.inflate(R.layout.dialog_backup, container, false); // get target translation to backup Bundle args = getArguments();//from w ww. j a v a2 s . co m if (args != null && args.containsKey(ARG_TARGET_TRANSLATION_ID)) { String targetTranslationId = args.getString(ARG_TARGET_TRANSLATION_ID, null); targetTranslation = App.getTranslator().getTargetTranslation(targetTranslationId); if (targetTranslation == null) { throw new InvalidParameterException( "The target translation '" + targetTranslationId + "' is invalid"); } } else { throw new InvalidParameterException("The target translation id was not specified"); } targetTranslation.setDefaultContributor(App.getProfile().getNativeSpeaker()); mBackupToCloudButton = (LinearLayout) v.findViewById(R.id.backup_to_cloud); LinearLayout exportProjectButton = (LinearLayout) v.findViewById(R.id.backup_to_sd); Button backupToAppButton = (Button) v.findViewById(R.id.backup_to_app); Button backupToDeviceButton = (Button) v.findViewById(R.id.backup_to_device); LinearLayout exportToPDFButton = (LinearLayout) v.findViewById(R.id.export_to_pdf); LinearLayout exportToUsfmButton = (LinearLayout) v.findViewById(R.id.export_to_usfm); Button logout = (Button) v.findViewById(R.id.logout_button); logout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { App.setProfile(null); Intent logoutIntent = new Intent(getActivity(), ProfileActivity.class); startActivity(logoutIntent); } }); final String filename = targetTranslation.getId() + "." + Translator.ARCHIVE_EXTENSION; initProgressWatcher(R.string.backup); if (savedInstanceState != null) { // check if returning from device alias dialog settingDeviceAlias = savedInstanceState.getBoolean(STATE_SETTING_DEVICE_ALIAS, false); mDialogShown = eDialogShown .fromInt(savedInstanceState.getInt(STATE_DIALOG_SHOWN, eDialogShown.NONE.getValue())); mAccessFile = savedInstanceState.getString(STATE_ACCESS_FILE, null); mDialogMessage = savedInstanceState.getString(STATE_DIALOG_MESSAGE, null); isOutputToDocumentFile = savedInstanceState.getBoolean(STATE_OUTPUT_TO_DOCUMENT_FILE, false); mDestinationFolderUri = Uri.parse(savedInstanceState.getString(STATE_OUTPUT_FOLDER_URI, "")); restoreDialogs(); } Button dismissButton = (Button) v.findViewById(R.id.dismiss_button); dismissButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); backupToDeviceButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO: 11/18/2015 eventually we need to support bluetooth as well as an adhoc network showDeviceNetworkAliasDialog(); } }); // backup buttons mBackupToCloudButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (App.isNetworkAvailable()) { // make sure we have a gogs user if (App.getProfile().gogsUser == null) { showDoor43LoginDialog(); return; } doPullTargetTranslationTask(targetTranslation, MergeStrategy.RECURSIVE); } else { showNoInternetDialog(); // replaced snack popup which could be hidden behind dialog } } }); exportToPDFButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { PrintDialog printDialog = new PrintDialog(); Bundle printArgs = new Bundle(); printArgs.putString(PrintDialog.ARG_TARGET_TRANSLATION_ID, targetTranslation.getId()); printDialog.setArguments(printArgs); showDialogFragment(printDialog, PrintDialog.TAG); } }); exportProjectButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { doSelectDestinationFolder(false); } }); exportToUsfmButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { doSelectDestinationFolder(true); } }); if (targetTranslation.isObsProject()) { LinearLayout exportToUsfmSeparator = (LinearLayout) v.findViewById(R.id.export_to_usfm_separator); exportToUsfmSeparator.setVisibility(View.GONE); exportToUsfmButton.setVisibility(View.GONE); } backupToAppButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { File exportFile = new File(App.getSharingDir(), filename); try { App.getTranslator().exportArchive(targetTranslation, exportFile); } catch (Exception e) { Logger.e(TAG, "Failed to export the target translation " + targetTranslation.getId(), e); } if (exportFile.exists()) { Uri u = FileProvider.getUriForFile(getActivity(), "com.door43.translationstudio.fileprovider", exportFile); Intent i = new Intent(Intent.ACTION_SEND); i.setType("application/zip"); i.putExtra(Intent.EXTRA_STREAM, u); startActivity(Intent.createChooser(i, "Email:")); } else { Snackbar snack = Snackbar.make(getActivity().findViewById(android.R.id.content), R.string.translation_export_failed, Snackbar.LENGTH_LONG); ViewUtil.setSnackBarTextColor(snack, getResources().getColor(R.color.light_primary_text)); snack.show(); } } }); // connect to existing tasks PullTargetTranslationTask pullTask = (PullTargetTranslationTask) TaskManager .getTask(PullTargetTranslationTask.TASK_ID); RegisterSSHKeysTask keysTask = (RegisterSSHKeysTask) TaskManager.getTask(RegisterSSHKeysTask.TASK_ID); CreateRepositoryTask repoTask = (CreateRepositoryTask) TaskManager.getTask(CreateRepositoryTask.TASK_ID); PushTargetTranslationTask pushTask = (PushTargetTranslationTask) TaskManager .getTask(PushTargetTranslationTask.TASK_ID); ExportProjectTask projectExportTask = (ExportProjectTask) TaskManager.getTask(ExportProjectTask.TASK_ID); ExportToUsfmTask usfmExportTask = (ExportToUsfmTask) TaskManager.getTask(ExportToUsfmTask.TASK_ID); if (pullTask != null) { taskWatcher.watch(pullTask); } else if (keysTask != null) { taskWatcher.watch(keysTask); } else if (repoTask != null) { taskWatcher.watch(repoTask); } else if (pushTask != null) { taskWatcher.watch(pushTask); } else if (projectExportTask != null) { taskWatcher.watch(projectExportTask); } else if (usfmExportTask != null) { taskWatcher.watch(usfmExportTask); } return v; }
From source file:com.amazon.appstream.fireclient.FireClientActivity.java
/** * Initialization. Sets up the app and spawns the connection * dialog./* w ww. j a v a 2 s . c o m*/ */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.v(TAG, "onCreate"); mGestureDetector = new GestureDetector(this, this); mGestureDetector.setIsLongpressEnabled(false); mTouchscreenAvailable = getPackageManager().hasSystemFeature("android.hardware.touchscreen"); SharedPreferences prefs = getSharedPreferences("main", MODE_PRIVATE); if (prefs.contains(SERVER_ADDRESS)) { mServerAddress = prefs.getString(SERVER_ADDRESS, null); } if (prefs.contains(DES_SERVER_ADDRESS)) { mDESServerAddress = prefs.getString(DES_SERVER_ADDRESS, null); } if (prefs.contains(USE_APP_SERVER)) { mUseAppServer = prefs.getBoolean(USE_APP_SERVER, false); } if (prefs.contains(APP_ID)) { mAppId = prefs.getString(APP_ID, null); } if (prefs.contains(USER_ID)) { mUserId = prefs.getString(USER_ID, null); } requestWindowFeature(Window.FEATURE_NO_TITLE); }
From source file:org.openremote.android.console.GroupActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_NO_TITLE); getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); Log.i("OpenRemote-ORIENTATION", "onCreate:" + display.getOrientation()); if (display != null && display.getOrientation() == 1) { isLandscape = true;//from www . j a v a2s. c o m lastConfigurationOrientation = Configuration.ORIENTATION_LANDSCAPE; } else { isLandscape = false; lastConfigurationOrientation = Configuration.ORIENTATION_PORTRAIT; } this.gestureScanner = new GestureDetector(this); if (groupViews == null) { groupViews = new HashMap<Integer, GroupView>(); } if (navigationHistory == null) { navigationHistory = new ArrayList<Navigate>(); } recoverLastGroupScreen(); addControllerRefreshEventListener(); initOrientationListener(); }
From source file:com.example.ffmpegtest.HWRecorderActivity.java
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); setContentView(R.layout.activity_hwrecorder); liveIndicator = (TextView) findViewById(R.id.liveLabel); button = (Button) findViewById(R.id.button1); button.setOnClickListener(new View.OnClickListener() { @Override//w w w . j a va2 s. com public void onClick(View v) { onRecordButtonClicked(v); } }); LocalBroadcastManager.getInstance(this).registerReceiver(mMessageReceiver, new IntentFilter(LiveHLSRecorder.INTENT_ACTION)); settingsStorage = new SharedPreferencesStorage(getSharedPreferences("SETTINGS", MODE_PRIVATE)); cpuMonitor = new CpuMonitor(); cpuMonitor.start(); // if (VIDEO_STREAMS_COUNT == 1) { // note3 version settings = new Settings(); settings.setWidth(1280); settings.setHeight(720); settings.setHlsSegmentLength(2); // seconds settings.setHlsSegmentCount(10); // files limit settings.setVideoBitrate((2 * 1000 * 1000)); settings.setFps_min(30); settings.setFps_max(30); settings.setI_frame_interval(1); // less than segment length !!! Otherwise some segments will not have stream params // } else { // dragonboard version settings = (settingsStorage.hasSettings() ? settingsStorage.load() : new Settings()); // } startHLSServer(); // if (VIDEO_STREAMS_COUNT == 1) { startMotorolaAPIServer(); // } else { startSettingsServer(); // } // start streaming /* onApiStartRequested(settings); new Handler().postDelayed(new Runnable() { @Override public void run() { try { motorolaApiServer.getRecordsService().getLiveManifest(); } catch (Exception e) { e.printStackTrace(); } } }, 5000); */ }