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:net.bytten.comicviewer.ComicViewerActivity.java
protected void resetContent() { comicDef = makeComicDef();// ww w.ja v a 2s . com provider = comicDef.getProvider(); comicInfo = provider.createEmptyComicInfo(); //Only hide the title bar if we're running an android less than Android 3.0 if (VersionHacks.getSdkInt() < 11) requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main); webview = (HackedWebView) findViewById(R.id.viewer); title = (TextView) findViewById(R.id.title); comicIdSel = (EditText) findViewById(R.id.comicIdSel); webview.requestFocus(); zoom = webview.getZoomControls(); webview.setClickable(true); webview.setOnClickListener(new OnClickListener() { public void onClick(View v) { if (!"".equals(comicInfo.getAlt())) showDialog(DIALOG_SHOW_HOVER_TEXT); } }); title.setText(comicInfo.getTitle()); comicIdSel.setText(comicInfo.getId()); if (comicDef.idsAreNumbers()) comicIdSel.setInputType(InputType.TYPE_CLASS_NUMBER); comicIdSel.setOnEditorActionListener(new OnEditorActionListener() { public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { String text = comicIdSel.getText().toString(); if (!text.equals("") && (actionId == EditorInfo.IME_ACTION_GO || (actionId == EditorInfo.IME_NULL && event.getKeyCode() == KeyEvent.KEYCODE_ENTER))) { loadComic(createComicUri(text)); comicIdSel.setText(""); return true; } return false; } }); comicIdSel.setOnFocusChangeListener(new OnFocusChangeListener() { public void onFocusChange(View v, boolean hasFocus) { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if (hasFocus) { comicIdSel.setText(""); imm.showSoftInput(comicIdSel, InputMethodManager.SHOW_IMPLICIT); } else { imm.hideSoftInputFromWindow(comicIdSel.getWindowToken(), 0); } } }); ((Button) findViewById(R.id.firstBtn)).setOnClickListener(new View.OnClickListener() { public void onClick(View v) { goToFirst(); } }); ((Button) findViewById(R.id.prevBtn)).setOnClickListener(new View.OnClickListener() { public void onClick(View v) { goToPrev(); } }); ((Button) findViewById(R.id.nextBtn)).setOnClickListener(new View.OnClickListener() { public void onClick(View v) { goToNext(); } }); ((Button) findViewById(R.id.finalBtn)).setOnClickListener(new View.OnClickListener() { public void onClick(View v) { goToFinal(); } }); ((ImageView) findViewById(R.id.randomBtn)).setOnClickListener(new View.OnClickListener() { public void onClick(View v) { goToRandom(); } }); bookmarkBtn = (ImageView) findViewById(R.id.bookmarkBtn); bookmarkBtn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { toggleBookmark(); } }); refreshBookmarkBtn(); }
From source file:com.daxstudio.sa.base.android.BaseDialogFragment.java
@Nullable @Override/*w w w . j a v a2 s.c o m*/ public View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); getDialog().setCanceledOnTouchOutside(isCanceledOnTouchOutside()); return inflater.inflate(getLayoutRes(), container, false); }
From source file:se.anyro.tagtider.StationActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.transfers);//from w w w. ja v a2 s .co m Bundle extras = getIntent().getExtras(); mStationName = extras.getString("stationName"); mStationId = extras.getInt("stationId"); mType = extras.getString("type"); if (!mType.equals(sLastType) || mStationId != sLastStationId) { sLastUpdate = 0; // Make sure we reload the data sLastStationId = mStationId; sLastType = mType; } TextView title = (TextView) findViewById(R.id.title); TextView place = (TextView) findViewById(R.id.place); if (Station.ARRIVIALS.equals(mType)) { title.setText(mStationName + " - Ankomster"); mFrom = FROM_ARRIVAL; place.setText("Frn"); } else { title.setText(mStationName + " - Avgngar"); mFrom = FROM_DEPARTURE; place.setText("Till"); } mEmptyView = (TextView) findViewById(android.R.id.empty); mProgress = findViewById(R.id.progress); }
From source file:com.androidexperiments.sprayscape.unitydriveplugin.GoogleDriveUnityPlayerActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); getWindow().setFormat(PixelFormat.RGBX_8888); // <--- This makes xperia play happy mUnityPlayer = new UnityPlayer(this); setContentView(mUnityPlayer);/*from ww w . ja v a2 s . c o m*/ mUnityPlayer.requestFocus(); credential = GoogleAccountCredential .usingOAuth2(getApplicationContext(), Arrays.asList(DRIVE_FILE_SCOPE, DRIVE_APPFOLDER_SCOPE, PLUS_EMAIL_SCOPE)) .setBackOff(new ExponentialBackOff()); }
From source file:com.amazon.appstream.sampleclient.SampleClientActivity.java
/** * Initialization. Sets up the app and spawns the connection * dialog./* w ww .j a va 2s. c om*/ */ @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"); Log.v(TAG, "Touch screen available: " + mTouchscreenAvailable); 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:ca.cmput301f13t03.adventure_datetime.view.FullScreen_Image.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Fullscreen requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.fullscreen_image); _pageAdapter = new StoryPagerAdapter(getSupportFragmentManager()); _viewPager = (ViewPager) findViewById(R.id.author_pager); _viewPager.setAdapter(_pageAdapter); setUpView();// w ww.j a va 2 s. c o m }
From source file:app.axe.imooc.zxing.app.CaptureActivity.java
@Override public void onCreate(Bundle icicle) { requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); super.onCreate(icicle); Window window = getWindow();/*from w ww .ja va 2 s .c om*/ window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); setContentView(R.layout.activity_qrcode_capture_layout); Util.currentActivity = this; CameraManager.init(getApplication()); viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view); mButtonBack = (Button) findViewById(R.id.button_back); mButtonBack.setOnClickListener(click); createBtn = (Button) findViewById(R.id.qrcode_btn); createBtn.setOnClickListener(click); photoBtn = (Button) findViewById(R.id.photo_btn); photoBtn.setOnClickListener(click); flashBtn = (Button) findViewById(R.id.flash_btn); flashBtn.setOnClickListener(click); surfaceView = (SurfaceView) findViewById(R.id.preview_view); surfaceHolder = surfaceView.getHolder(); surfaceHolder.addCallback(this); surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); hasSurface = false; inactivityTimer = new InactivityTimer(this); handler = null; lastResult = null; hasSurface = false; inactivityTimer = new InactivityTimer(this); beepManager = new BeepManager(this); // showHelpOnFirstLaunch(); }
From source file:com.example.haizhu.myvoiceassistant.ui.RobotChatActivity.java
private void setStatusBarTranslate() { getWindow().requestFeature(Window.FEATURE_NO_TITLE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); window.getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.setStatusBarColor(Color.TRANSPARENT); }/*from w ww .ja v a 2 s . c o m*/ }
From source file:com.example.transfer.MainActivity.java
@SuppressLint("NewApi") @Override/* ww w . j a v a 2 s . co m*/ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_main); if (android.os.Build.VERSION.SDK_INT > 9) { StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); } // Get handles to the UI view objects mLatLng = (TextView) findViewById(R.id.lat_lng); mAddress = (TextView) findViewById(R.id.address); mActivityIndicator = (ProgressBar) findViewById(R.id.address_progress); mConnectionState = (TextView) findViewById(R.id.text_connection_state); mConnectionStatus = (TextView) findViewById(R.id.text_connection_status); // Create a new global location parameters object mLocationRequest = LocationRequest.create(); progressBar = (ProgressBar) findViewById(R.id.progressBar1); new Thread(new Runnable() { public void run() { while (progressStatus < 100) { progressStatus += 1; // Update the progress bar and display the current value in // the text view handler.post(new Runnable() { public void run() { progressBar.setProgress(progressStatus); // textView.setText(progressStatus+"/"+progressBar.getMax()); } }); try { // Sleep for 200 milliseconds. Just to display the // progress slowly Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(); } } } }).start(); /* * b = new Thread(new Runnable() { public void run() { while * (progressStatus < 100) { // progressStatus += 1; // Update the * progress bar and display the current value in // the text view * handler.post(new Runnable() { public void run() { * progressBar.setProgress(progressStatus); // * textView.setText(progressStatus+"/"+progressBar.getMax()); } }); // * try { // // Sleep for 200 milliseconds. Just to display the // * progress slowly // Thread.sleep(200); // } catch * (InterruptedException e) { // e.printStackTrace(); // } } } }); */ /* * Set the update interval */ mLocationRequest.setInterval(LocationUtils.UPDATE_INTERVAL_IN_MILLISECONDS); // Use high accuracy mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); // Set the interval ceiling to one minute mLocationRequest.setFastestInterval(LocationUtils.FAST_INTERVAL_CEILING_IN_MILLISECONDS); // Note that location updates are off until the user turns them on mUpdatesRequested = false; // Open Shared Preferences mPrefs = getSharedPreferences(LocationUtils.SHARED_PREFERENCES, Context.MODE_PRIVATE); // Get an editor mEditor = mPrefs.edit(); /* * Create a new location client, using the enclosing class to handle * callbacks. */ mLocationClient = new LocationClient(this, this, this); ImageButton myB = (ImageButton) findViewById(R.id.bgImage); myB.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { gps = new GPSTracker(MainActivity.this); if (gps.canGetLocation()) { // \n is for new line // Toast.makeText(getApplicationContext(), // "Your Location is - \nLat: " + latitude + "\nLong: " + // longitude, Toast.LENGTH_LONG).show(); } else { // can't get location // GPS or Network is not enabled // Ask user to enable GPS/network in settings gps.showSettingsAlert(); } String district = null; String address = null; String lat = null; String log = null; // If Google Play Services is available if (servicesConnected()) { startPeriodicUpdates(); try { a.start(); Thread.sleep(5000); } catch (Exception e) { } // Get the current location Location currentLocation = mLocationClient.getLastLocation(); /* * Thread d = new Thread() { public void run() { * * } }; */ try { // Display the current location in the UI Log.i("i", LocationUtils.getLatLng(v.getContext(), currentLocation)); String[] curloc = LocationUtils.getLatLng(v.getContext(), currentLocation).split(","); String url = "http://maps.googleapis.com/maps/api/geocode/json?latlng=" + curloc[0].trim() + "," + curloc[1].trim() + "&sensor=true&language=zh-TW"; lat = curloc[0].trim(); log = curloc[1].trim(); // progressBar.setProgress(50); JSONParser jsp = new JSONParser(); Log.i("hihihi", "Helloken http://maps.googleapis.com/maps/api/geocode/json?latlng=" + curloc[0].trim() + "," + curloc[1].trim() + "&sensor=true"); JSONObject obj = jsp.getJSONFromUrl(url); // TextView tw = (TextView) findViewById(R.id.address); mAddress.setText( obj.getJSONArray("results").getJSONObject(0).getString("formatted_address")); address = obj.getJSONArray("results").getJSONObject(0).getString("formatted_address"); JSONArray result = obj.getJSONArray("results"); for (int i = 0; result.getJSONObject(i) != null; i++) { JSONObject jo = result.getJSONObject(i); JSONArray a = jo.getJSONArray("address_components"); for (int x = 0; x < a.length(); x++) { JSONObject b = a.getJSONObject(x); if (b.getString("long_name").contains("?")) { mAddress.setText(mAddress.getText() + b.getString("long_name")); Log.i("i", "HelloKen " + b.getString("long_name")); district = b.getString("long_name"); } } if (district != null) break; } } catch (Exception e) { Log.i("i", "i error" + e.getMessage()); } finally { String districtTemp = null; String myDistrict = null; String districtAirPol = null; try { DBHelper dbh = new DBHelper(v.getContext()); Cursor c = dbh.getDistricts(); // get weather WeatherRSSpaser wrss = new WeatherRSSpaser( "http://rss.weather.gov.hk/rss/CurrentWeather_uc.xml"); wrss.readRSS(); String str = wrss.getResult().get(0); String disfromrss = "nothing"; String tempfromrss = ""; // System.out.println(str); String[] tdstr = str.split("<tr>"); for (int count = 0; count < tdstr.length; count++) { // progressStatus += 1; int s = tdstr[count].indexOf("<td>") + 4; int e = tdstr[count].indexOf("</td>"); if (s > 0 && e > 0) { Log.i("log", "->[" + tdstr[count].substring(s, e) + "]"); disfromrss = obserlocationToDistrict(tdstr[count].substring(s, e)); } s = tdstr[count].indexOf("<td width=\"100\" align=\"right\">") + 30; e = tdstr[count].indexOf("</SPAN>"); if (s > 0 && e > 0) tempfromrss = tdstr[count].substring(s, e); if (disfromrss.equals(district)) { mAddress.setText(mAddress.getText() + disfromrss + tempfromrss + "\n"); districtTemp = tempfromrss; } } // weather index ArrayList<String> al; RSSpaser rssp = new RSSpaser( "http://www.aqhi.gov.hk/epd/ddata/html/out/aqhi_ind_rss_ChT.xml"); rssp.readRSS(); al = rssp.getResult(); for (int cc = 0; cc < al.size(); cc++) { // if(al.get(cc).contains(district)) mAddress.setText(mAddress.getText() + al.get(cc) + "\n"); } while (c.moveToNext()) { Log.i("i", "HelloKen" + c.getString(c.getColumnIndex("DISTRICT"))); String temp = c.getString(c.getColumnIndex("DISTRICT")); // mAddress.setText(mAddress.getText() + // "your text here"+disfromrss + tempfromrss); if (temp.equals("TAI PO") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("SHA TIN") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("SOUTHERN") && district.equals("??")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("NORTH") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("YAU TSIM MONG") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("TUEN MUN") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("SAI KUNG") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("ISLANDS") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("KWAI TSING") && district.equals("??")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("YUEN LONG") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("TSUEN WAN") && district.equals("???")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("CENTRAL & WESTERN") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("WAN CHAI") && district.equals("??")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("KOWLOON CITY") && district.equals("???")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("WONG TAI SIN") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("KWUN TONG") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("SHAM SHUI PO") && district.equals("?")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } if (temp.equals("EASTERN") && district.equals("??")) { mAddress.setText( mAddress.getText() + c.getString(c.getColumnIndex("CHINAME")) + "\n"); } } dbh.close(); WeatherDescRSSpaser wdr = new WeatherDescRSSpaser(); wdr.readRSS(); stopPeriodicUpdates(); Intent i = new Intent(v.getContext(), GovActivity.class); i.putExtra("weather", wdr.getResult()); i.putExtra("lat", lat); i.putExtra("log", log); i.putExtra("temp", districtTemp); i.putExtra("district", district); i.putExtra("address", address); startActivity(i); } catch (Exception e) { // TODO Auto-generated catch block Log.i("i", "HelloKen " + e.getMessage());// .getMessage()); } } } } }); }
From source file:com.andrew.apollo.ui.activities.AudioPlayerActivity.java
/** * {@inheritDoc}//from w w w .j ava2s . c o m */ @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); // Initialize the image fetcher/cache mImageFetcher = ApolloUtils.getImageFetcher(this); // Initialize the handler used to update the current time mTimeHandler = new TimeHandler(this); // Initialize the broadcast receiver mPlaybackStatus = new PlaybackStatus(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.activity_player_base); // Cache all the items initPlaybackControls(); }