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.finlay.geomonsters.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { Log.v(TAG, "onCreated"); super.onCreate(savedInstanceState); _activity = this; // set app to fullscreen requestWindowFeature(Window.FEATURE_NO_TITLE); // layout/* w ww .j a va 2 s . co m*/ setContentView(R.layout.activity_ranch); // Socket, Location Manager, Weather Manager locationListener = new MyLocationListener(this); locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); socket = new SocketIO(); weatherManager = new WeatherManager(this); // layout items theTextView = (TextView) findViewById(R.id.txtMessage); forceButton = (Button) findViewById(R.id.btnGetLocation); waitButton = (Button) findViewById(R.id.btnWaitLocation); loadEncounterButton = (Button) findViewById(R.id.btnLoadEncounter); // TODO get rid of this. For now, reset the encounters file whenever created ConfigManager.ResetConfigFiles(getApplicationContext()); forceButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Log.v(TAG, "Force Click"); // Ensure connected if (!isNetworkAvailable()) { setMessage("No internet connection."); return; } forceButton.setText("..."); // Connect to server connectSocket(); // Best provider Criteria criteria = new Criteria(); String bestProvider = locationManager.getBestProvider(criteria, false); // Request location updates locationManager.requestLocationUpdates(bestProvider, 10000, 0, locationListener); forceButton.setEnabled(false); loadEncounterButton.setEnabled(false); } }); waitButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.v(TAG, "Wait click"); waitButton.setText("..."); // Start Encounter Service // TODO Service should be started at boot? _activity.startService(new Intent(_activity, EncounterService.class)); waitButton.setEnabled(false); } }); loadEncounterButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Log.v(TAG, "Load encounter clicked"); // Ensure connection if (!isNetworkAvailable()) { setMessage("No internet connection."); return; } // Pull encounter String encounter = ConfigManager.PullEncounter(getApplicationContext()); if (encounter.equals("")) return; // Use location & time from gathered string to query encounter String[] location = encounter.split(","); String latitude = location[0]; String longitude = location[1]; // TODO We cannot get historical weatherdata accurately. So we will just use the current time :( // Pop used encounter from queue ConfigManager.PopEncounter(getApplicationContext()); // Server & weather connectSocket(); weatherManager.execute(longitude, latitude); while (!socket.isConnected()) ; // Send query to server sendLocation(longitude, latitude); } }); // Change the text value of the loadEncounterButton to the number of encounters available timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { public void run() { loadEncounterButton.setText("" + ConfigManager.EncounterCount(getApplicationContext())); } }); } }, 0, UPDATE_DELAY); }
From source file:com.safecell.AccountFormActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setWindowAnimations(R.anim.null_animation); context = AccountFormActivity.this; this.initUI(); profilesRepository = new ProfilesRepository(context); createAccountButton.setOnClickListener(createAccountButtonOnclickListenr); progressDialog = new ProgressDialog(context); licenseProgressDialog = new ProgressDialog(context); licenseThread = new LicenseThread(); Intent intent = getIntent();/*from ww w .j a va 2 s . c o m*/ Bundle bundle = intent.getExtras(); callingActivity = bundle.getString("from"); handler = new Handler() { @Override public void handleMessage(Message msg) { // TODO Auto-generated method stub super.handleMessage(msg); licenseProgressDialog.dismiss(); if (licenseThread.isAlive()) { licenseThread.interrupt(); licenseThread = new LicenseThread(); } if (licensekeyString == null) { message = getLicenseKey.getFailureMessage(); UIUtils.OkDialog(context, message); return; } selectLicenseFromDialog(); } }; PackageManager pm = getPackageManager(); try { //---get the package info--- PackageInfo pi = pm.getPackageInfo("com.safecell", 0); //Log.v("Version Code", "Code = "+pi.versionCode); //Log.v("Version Name", "Name = "+pi.versionName); versionName = pi.versionName; } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } preferences = getSharedPreferences("AccountUniqueID", MODE_WORLD_WRITEABLE); preferences.getString("AccountUID", ""); createAccountUniqueID(SCProfile.newUniqueDeviceKey()); }
From source file:com.fvd.nimbus.MainActivity.java
/** Called when the activity is first created. */ @Override//from w ww . j av a 2 s. c o m public void onCreate(Bundle savedInstanceState) { try { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); try { requestWindowFeature(Window.FEATURE_NO_TITLE); } catch (Exception e) { e.printStackTrace(); } File ex = getExternalCacheDir(); if (ex == null) ex = getCacheDir(); if (ex == null) ex = Environment.getExternalStorageDirectory(); if (ex != null) appSettings.cacheDir = ex.getPath(); setContentView(R.layout.screen_start); //overridePendingTransition( R.anim.slide_in_up, R.anim.slide_out_up ); overridePendingTransition(R.anim.activity_open_translate, R.anim.activity_close_translate); if (!isTaskRoot()) { Intent intent = getIntent(); String action = intent.getAction(); if (action != null && action.equals(Intent.ACTION_MAIN)) { finish(); return; } } prefs = PreferenceManager.getDefaultSharedPreferences(this); appSettings.getInstance().setIsTablet(isTablet()); serverHelper.getInstance().setCallback(this, this); /*findViewById(R.id.bTakePhoto).setOnClickListener(this); findViewById(R.id.bFromGallery).setOnClickListener(this); findViewById(R.id.bWebClipper).setOnClickListener(this); findViewById(R.id.bPdfAnnotate).setOnClickListener(this); findViewById(R.id.ibSettings).setOnClickListener(this);*/ /*userMail = prefs.getString("userMail", ""); userPass = prefs.getString("userPass", ""); String sessionId = prefs.getString("sessionId", ""); appSettings.sessionId=sessionId; appSettings.userMail=userMail; appSettings.userPass=userPass;*/ appSettings.init(this); userMail = appSettings.userMail; userPass = appSettings.userPass; if (isFirst()) { createShortcut(this); showHelp(); } else if (!prefs.getBoolean("offline", false)) { if ((userMail.length() == 0 || userPass.length() == 0)) showLogin(); else { if (appSettings.sessionId.length() == 0 /*|| true*/) { //serverHelper.getInstance().setSessionId(sessionId); serverHelper.getInstance().sendRequest("user:auth", String.format("\"email\":\"%s\",\"password\":\"%s\"", userMail, userPass), ""); } else { //serverHelper.getInstance().setSessionId(sessionId); serverHelper.getInstance().sendQuietRequest("user:authstate", "", ""); } AppRate.start(this); } } else AppRate.start(this); } catch (Exception e) { appSettings.appendLog("main:onCreate " + e.getMessage()); } }
From source file:com.chuger.bithdayapp.view.auth.AuthDialog.java
@Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); mSpinner = new ProgressDialog(getContext()); mSpinner.requestWindowFeature(Window.FEATURE_NO_TITLE); mSpinner.setMessage("Loading..."); requestWindowFeature(Window.FEATURE_NO_TITLE); mContent = new FrameLayout(getContext()); /* Create the 'x' image, but don't add to the mContent layout yet * at this point, we only need to know its drawable width and height * to place the webview/*w ww . j a v a2 s .co m*/ */ createCrossImage(); /* Now we know 'x' drawable width and height, * layout the webivew and add it the mContent layout */ final int crossWidth = mCrossImage.getDrawable().getIntrinsicWidth(); setUpWebView(crossWidth / 2); /* Finally add the 'x' image to the mContent layout and * add mContent to the Dialog view */ mContent.addView(mCrossImage, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); addContentView(mContent, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); }
From source file:com.tarsoft.openlibra.ollista.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // prevent the default title-bar from being displayed requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.ollista);//from w w w .ja va 2 s . c o m //Create BBDD object DAO = new DBOpenLibra(this); //ActionBar mActionBar = (ActionBar) findViewById(R.id.actionBar); mActionBar.setTitle(R.string.app_name); // set home icon that does nothing when the user clicks on it mActionBar.setHomeLogo(R.drawable.icon); mActionBar.addActionIcon(R.drawable.refresh, new OnClickListener() { @Override public void onClick(View v) { //load data on activity adapters loadData(true); } }); mActionBar.addActionIcon(R.drawable.change, new OnClickListener() { @Override public void onClick(View v) { Toast.makeText(ollista.this, "Clicked on an Icon Change", Toast.LENGTH_SHORT).show(); } }); // sets an action icon that displays a Toast upon clicking mActionBar.addActionIcon(R.drawable.search, new OnClickListener() { @Override public void onClick(View v) { Toast.makeText(ollista.this, "Clicked on an Icon Search", Toast.LENGTH_SHORT).show(); } }); //Data listerMost = (ListView) findViewById(R.id.list2); if (adapterLast == null) { adapterLast = new listaOLIconArrayAdapter(ollista.this, listaLast); } //Covers gallery Gallery gallery = (Gallery) findViewById(R.id.gallery); gallery.setAdapter(adapterLast); /* gallery.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { Toast.makeText(ollista.this, "" + position, Toast.LENGTH_SHORT).show(); } }); */ //Most viewed list if (adapterMost == null) { adapterMost = new listaOLArrayAdapter(ollista.this, listaMost); } listerMost.setTextFilterEnabled(true); listerMost.setItemsCanFocus(true); listerMost.setChoiceMode(ListView.CHOICE_MODE_SINGLE); listerMost.setAdapter(adapterMost); //Evaluate Internet available try { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo checkInternet = cm.getActiveNetworkInfo(); if (checkInternet != null && checkInternet.isConnectedOrConnecting()) { checkConexion = true; } else { checkConexion = false; } } catch (Exception e) { e.printStackTrace(); Log.d(TAG, "Error when check if internet available: " + e.toString()); } //load data on activity adapters loadData(false); }
From source file:com.nestapi.lib.UserAuthActivity.java
@SuppressLint("SetJavaScriptEnabled") @Override/*from w w w . j ava 2s . c o m*/ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.nest_auth_webview_layout); WindowManager.LayoutParams params = getWindow().getAttributes(); params.height = ViewGroup.LayoutParams.MATCH_PARENT; params.width = ViewGroup.LayoutParams.MATCH_PARENT; params.horizontalMargin = 50; params.verticalMargin = 50; getWindow().setAttributes(params); clientWebView = (WebView) findViewById(R.id.auth_webview); mProgressBar = (ProgressBar) findViewById(R.id.webview_progress); mClientMetadata = getClientMetadata(); if (!hasValidArgs(mClientMetadata.getRedirectURL(), mClientMetadata.getClientID(), mClientMetadata.getStateValue())) { log("invalid arguments..."); setResult(RESULT_CANCELED); log("finishing"); finish(); } clientWebView.setWebChromeClient(new ProgressChromeClient()); clientWebView.setWebViewClient(new RedirectClient()); mWebViewUrl = String.format(APIUrls.CLIENT_CODE_URL, mClientMetadata.getClientID(), mClientMetadata.getStateValue()); log("setting url: " + mWebViewUrl); WebSettings webSettings = clientWebView.getSettings(); webSettings.setJavaScriptEnabled(true); clientWebView.loadUrl(mWebViewUrl); }
From source file:net.dian1.player.activity.RadioActivity.java
/** Called when the activity is first created. */ @Override//from w w w.j a va 2 s .com public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.search); mRadioListView = (ListView) findViewById(R.id.SearchListView); mRadioAdapter = new RadioAdapter(this); mRadioListView.setAdapter(mRadioAdapter); mRadioListView.setOnItemClickListener(mRadioListListener); mButton = (Button) findViewById(R.id.SearchButton); mButton.setText(R.string.radio); mButton.setOnClickListener(mButtonClickListener); mEditText = (EditText) findViewById(R.id.SearchEditText); mViewFlipper = (ViewFlipper) findViewById(R.id.SearchViewFlipper); mSpinner = (Spinner) findViewById(R.id.SearchSpinner); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.radio_modes, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); mSpinner.setAdapter(adapter); mEditText.setHint(R.string.radio_hint); mRadioLoadingDialog = new RadioLoadingDialog(this, R.string.loading_recomended_radios, R.string.failed_recomended_radios); mRadioLoadingDialog.execute(); mSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long arg3) { switch (position) { case 0: // recent mRadioAdapter.setList(new DatabaseImpl(RadioActivity.this).getRecentRadios(20)); break; case 1: // recommended switch (mRadioLoadingDialog.getStatus()) { case RUNNING: break; case FINISHED: mRadioLoadingDialog = new RadioLoadingDialog(RadioActivity.this, R.string.loading_recomended_radios, R.string.failed_recomended_radios); mRadioLoadingDialog.execute(); break; case PENDING: mRadioLoadingDialog.execute(); break; } break; default: break; } setupListView(); } @Override public void onNothingSelected(AdapterView<?> arg0) { } }); // TODO (maybe) if recent.count > 0 set to recent mSpinner.setSelection(1); mGestureOverlayView = (GestureOverlayView) findViewById(R.id.gestures); mGestureOverlayView.addOnGesturePerformedListener(Dian1Application.getInstance().getPlayerGestureHandler()); }
From source file:com.renren.api.connect.android.view.RenrenDialog.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); progress = new ProgressDialog(getContext()); progress.requestWindowFeature(Window.FEATURE_NO_TITLE); progress.setMessage("Loading..."); content = new LinearLayout(getContext()); content.setOrientation(LinearLayout.VERTICAL); requestWindowFeature(Window.FEATURE_NO_TITLE); if (this.showTitle) { setUpTitle();//from w w w . j a v a2 s. co m } setUpWebView(); Display display = getWindow().getWindowManager().getDefaultDisplay(); float scale = getContext().getResources().getDisplayMetrics().density; float[] dimensions = display.getWidth() < display.getHeight() ? DIMENSIONS_PORTRAIT : DIMENSIONS_LANDSCAPE; addContentView(content, new FrameLayout.LayoutParams((int) (dimensions[0] * scale + 0.5f), (int) (dimensions[1] * scale + 0.5f))); }
From source file:com.example.qrpoll.PollActivity.java
@Override /**//from www . j av a 2s.c om * ustawienie wygladu okna, przypisanie akcji do gwiazdek */ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_poll); expListView = (ExpandableListView) findViewById(R.id.lvExp); tv1 = (TextView) findViewById(R.id.textView1); tv2 = (TextView) findViewById(R.id.textView2); tv3 = (TextView) findViewById(R.id.textView3); tv4 = (TextView) findViewById(R.id.textView4); version = (TextView) findViewById(R.id.poll_textViewVersionLabel); rb = (RatingBar) findViewById(R.id.ratingBar1); rb.setOnRatingBarChangeListener(new OnRatingBarChangeListener() { public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) { int rate = (int) (2 * rating); AboutDevice sr = new AboutDevice(getApplicationContext()); if (version.getText().equals("1")) { switch (rate) { case 0: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(10)); break; case 1: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(9)); break; case 2: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(8)); break; case 3: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(7)); break; case 4: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(6)); break; case 5: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(5)); break; case 6: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(4)); break; case 7: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(3)); break; case 8: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(2)); break; case 9: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(1)); break; case 10: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(0)); break; } } else { switch (rate) { case 0: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(0)); break; case 1: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(1)); break; case 2: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(2)); break; case 3: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(3)); break; case 4: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(4)); break; case 5: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(5)); break; case 6: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(6)); break; case 7: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(7)); break; case 8: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(8)); break; case 9: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(9)); break; case 10: poll.vote(sr.createIdToSend() + "/" + poll.ratingquestions.get(10)); break; } } } }); Intent intent = getIntent(); String url = intent.getStringExtra("scanResult"); url = "http://" + url; getPoll(url); try { prepareListData(); listAdapter = new ExpandableListAdapter(this, listDataHeader, listDataChild, poll); expListView.setAdapter(listAdapter); Refresh refresh = (Refresh) new Refresh(poll, this).execute(); String message = intent.getStringExtra("message"); if (!message.equals("none")) { Toast.makeText(getApplicationContext(), "Zaktualizowano pytania. Aktualna wersja: " + poll.getVersion(), Toast.LENGTH_LONG).show(); } } catch (Exception e) { Intent it = new Intent(getApplication(), MainActivity.class); startActivity(it); finish(); } }
From source file:com.iStudy.Study.Renren.View.RenrenDialog.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); progress = new ProgressDialog(getContext()); progress.requestWindowFeature(Window.FEATURE_NO_TITLE); progress.setMessage("Loading..."); content = new LinearLayout(getContext()); content.setOrientation(LinearLayout.VERTICAL); requestWindowFeature(Window.FEATURE_NO_TITLE); if (this.showTitle) { setUpTitle();/* w w w .ja v a 2s. com*/ } setUpWebView(); Display display = getWindow().getWindowManager().getDefaultDisplay(); float scale = getContext().getResources().getDisplayMetrics().density; @SuppressWarnings("deprecation") float[] dimensions = display.getWidth() < display.getHeight() ? DIMENSIONS_PORTRAIT : DIMENSIONS_LANDSCAPE; addContentView(content, new FrameLayout.LayoutParams((int) (dimensions[0] * scale + 0.5f), (int) (dimensions[1] * scale + 0.5f))); }