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.example.android.animationsdemo.PopCategoryActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); DKLog.d(TAG, Trace.getCurrentMethod()); // Obtain the shared Tracker instance. AnalyticsApplication application = (AnalyticsApplication) getApplication(); mTracker = application.getDefaultTracker(); // 1.initial/*ww w. j a va 2 s . c om*/ FacebookSdk.sdkInitialize(this); callbackManager = CallbackManager.Factory.create(); // 2.setView //Remove title bar this.requestWindowFeature(Window.FEATURE_NO_TITLE); //Remove notification bar this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_category); // 3.get ID mNaviBar = (TextView) findViewById(R.id.navi_category); mNaviBar.setOnClickListener(this); mFloatCategory = FloatCategory.getInstance(); mFloatCategory.init(this, mNaviBar); mFloatCategory.setOnCloseListener(mFloatDialogCloseListener); DKLog.d(TAG, SharedPrefsData.getEmail(this)); }
From source file:com.appndroid.ipl2013.SwipeyTabsSampleActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_swipeytab); String fontPath = "fonts/Face Your Fears.ttf"; TextView txtHead = (TextView) findViewById(R.id.title); Typeface tf = Typeface.createFromAsset(getAssets(), fontPath); txtHead.setTypeface(tf);/*from w w w . j a v a 2 s. co m*/ navigationImage = (ImageView) findViewById(R.id.nav); navigationImage.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { callEvent(); } }); mViewPager = (MultipleScrollViewPager) findViewById(R.id.flipper); mTabs = (SwipeyTabs) findViewById(R.id.swipeytabs); mfragmentList = new Vector<Fragment>(); bundle = new Bundle(); Fragment pointsFragment = Fragment.instantiate(this, PointsTableFragment.class.getName()); pointsFragment.setArguments(bundle); Fragment orangeFragment = Fragment.instantiate(this, OrangeCapFragment.class.getName()); orangeFragment.setArguments(bundle); Fragment purpleFragment = Fragment.instantiate(this, PurpleCapFragment.class.getName()); purpleFragment.setArguments(bundle); mfragmentList.add(pointsFragment); mfragmentList.add(orangeFragment); mfragmentList.add(purpleFragment); SwipeyTabsPagerAdapter adapter = new SwipeyTabsPagerAdapter(this, getSupportFragmentManager(), mfragmentList); mViewPager.setAdapter(adapter); mTabs.setAdapter(adapter); mViewPager.setOnPageChangeListener(mTabs); mViewPager.setCurrentItem(0); mViewPager.setOffscreenPageLimit(2); }
From source file:com.cls.sugutomo.utils.ZoomActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_zoom); //findViewById(R.id.container).getBackground().setAlpha(180); currentPos = getIntent().getIntExtra("pos", 0); // zoomImageFromThumb(); mPager = (ViewPager) findViewById(R.id.zoom_pager); // CustomFragmentAdapter.userAvatarList = urlsAvatar; // CustomFragmentAdapter.mCount = urlsAvatar.size(); CustomFragmentAdapter mAdapter = new CustomFragmentAdapter(getSupportFragmentManager(), true); mPager.setAdapter(mAdapter);/*from w ww . j av a 2 s. c o m*/ mPager.setCurrentItem(currentPos); // Retrieve and cache the system's default "short" animation time. }
From source file:com.wpi.assistments.HomeTabbedActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_webview); final ProgressDialog pd = ProgressDialog.show(this, "", "Loading...", true); isTeacher = false;/* www . java 2s. co m*/ toggle = true; logoutFlag = false; homeWebView = (WebView) findViewById(R.id.homeWebView); homeWebView.setWebViewClient(new WebViewClient() { public void onPageFinished(WebView view, String url) { Log.i("test", view.getUrl()); if (view.getUrl().equals("https://www.assistments.org/account/login") && !logoutFlag) { Intent intent = new Intent(getApplicationContext(), LoginActivity.class); intent.putExtra("showPopup", "true"); startActivity(intent); finish(); } else if (view.getUrl().equals("https://www.assistments.org/teacher")) { isTeacher = true; } else if (view.getUrl().equals("https://www.assistments.org/account/login") && logoutFlag) { Intent intent = new Intent(getApplicationContext(), LoginActivity.class); startActivity(intent); } if (!homeWebView.canGoBack()) { btnBack.setEnabled(false); } else { btnBack.setEnabled(true); } if (!homeWebView.canGoForward()) { btnForward.setEnabled(false); } else { btnForward.setEnabled(true); } if (pd.isShowing() && pd != null) { pd.dismiss(); } } @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { pd.show(); view.loadUrl(url); return true; } }); homeWebView.setWebChromeClient(new WebChromeClient() { @Override public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) { new AlertDialog.Builder(webviewContext).setTitle("ASSISTments").setMessage(message) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { logoutFlag = true; result.confirm(); } }).setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { result.cancel(); } }).create().show(); return true; } }); if (savedInstanceState != null) { homeWebView.restoreState(savedInstanceState); } else { /** Scaling, replaced by overview mode and wide view port Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); if (size.x <= 780) { int scaleRate = (int) ((size.x) / 7.8); Log.i("test", Integer.toString(size.x)); homeWebView.setInitialScale(scaleRate); } */ Intent intent = getIntent(); if (intent.getStringExtra("username").equals("") && intent.getStringExtra("password").equals("")) { homeWebView.loadUrl("https://www.assistments.org/signup"); } else { String username = intent.getStringExtra("username"); String password = intent.getStringExtra("password"); String postData = "login=" + username + "&password=" + password + "&commit=Log in"; homeWebView.postUrl("https://www.assistments.org/account/login", EncodingUtils.getBytes(postData, "BASE64")); } } WebSettings settings = homeWebView.getSettings(); settings.setSaveFormData(false); settings.setSavePassword(false); settings.setJavaScriptEnabled(true); settings.setBuiltInZoomControls(true); settings.setDisplayZoomControls(false); settings.setJavaScriptCanOpenWindowsAutomatically(true); settings.setSupportMultipleWindows(true); settings.setCacheMode(WebSettings.LOAD_NO_CACHE); settings.setAppCacheEnabled(false); settings.setDomStorageEnabled(true); settings.setDatabaseEnabled(true); settings.setUseWideViewPort(false); settings.setLoadWithOverviewMode(true); homeWebView.clearCache(true); homeWebView.setPadding(0, 0, 0, 0); homeWebView.setInitialScale(getScale()); btnBack = (Button) findViewById(R.id.btnBack); btnBack.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { homeWebView.goBack(); } }); btnRefresh = (Button) findViewById(R.id.btnRefresh); btnRefresh.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //homeWebView.zoomOut(); homeWebView.scrollTo(1000, 0); Log.i("test", "111"); //homeWebView.reload(); } }); btnForward = (Button) findViewById(R.id.btnForward); btnForward.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { homeWebView.goForward(); } }); btnOffline = (Button) findViewById(R.id.btnOffline); btnOffline.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (toggle) { homeWebView.loadUrl( "https://www.assistments.org/assistments/student/index.html#offlineUserAssignmentList/"); btnOffline.setText("Home"); toggle = false; } else { if (isTeacher) { homeWebView.loadUrl("https://www.assistments.org/teacher"); } else { homeWebView.loadUrl("https://www.assistments.org/tutor"); } btnOffline.setText("Offline"); toggle = true; } } }); }
From source file:com.manning.androidhacks.hack044.MainActivity2X.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main);/*from w w w .j a v a2 s . c o m*/ findViewById(R.id.content).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (mUseFullscreen) { getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); } else { getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); } mUseFullscreen = !mUseFullscreen; } }); }
From source file:com.example.cuisoap.agrimac.homePage.demand.machineSelectDialogFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE); View view = inflater.inflate(R.layout.dialog_select_machine, container); list = (ListView) view.findViewById(R.id.machine_select_list); adapter = new machineSelectAdapter(mContext); data = new ArrayList<>(); list.setAdapter(adapter);//w ww. ja v a 2 s. c om list.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { JSONObject jo = new JSONObject(); HashMap<String, String> item = (HashMap<String, String>) adapter.getItem(position); Intent i = new Intent(); i.setAction("select_machine"); i.putExtra("id", item.get("id")); i.putExtra("name", item.get("machine_name")); mContext.sendBroadcast(i); dismiss(); } }); Message m = Message.obtain(); JSONObject o = new JSONObject(); try { o.put("status", 0); JSONArray oo = new JSONArray("[{\n" + " \"driveType\": \"\",\n" + " \"driverName\": \"p\",\n" + " \"driverAge\": \"p\",\n" + " \"driverGender\": \"female\",\n" + " \"driverLicenseType\": \"R\",\n" + " \"driverLicense\": \"/sdcard/agrimac/driver2016_05_31_09_38_15.png\",\n" + " \"machineType\": \"\",\n" + " \"machineName\": \"p\",\n" + " \"machinePower\": \"1\",\n" + " \"passengerNum\": \"1\",\n" + " \"wheelDistance\": \"1\",\n" + " \"checkTime\": \"1\",\n" + " \"payType\": \"loan\",\n" + " \"machinePowerType\": \"\",\n" + " \"machineLicense1\": \"/sdcard/agrimac/machineinfo2016_05_31_09_38_34.png\",\n" + " \"machineLicense2\": \"/sdcard/agrimac/machineinfo2016_05_31_09_38_37.png\",\n" + " \"leaseMonth\": \"1\",\n" + " \"leaseTime\": \"1\",\n" + " \"workCondition\": \"\",\n" + " \"needType\": \"all\",\n" + " \"houseType\": \"normal_house\",\n" + " \"id\": \"1\"\n" + "}]"); o.put("data", oo); m.obj = o; m.setTarget(h); m.sendToTarget(); } catch (JSONException e) { e.printStackTrace(); } return view; }
From source file:com.perm.DoomPlay.LyricsDialog.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { title = getArguments().getString(keyLyricsTitle); View view = inflater.inflate(R.layout.dialog_lyrics, container, false); getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); linearLoading = (LinearLayout) view.findViewById(R.id.linearLoading); textView = (TextView) view.findViewById(R.id.textLyrics); if (savedInstanceState != null) { lyrics = savedInstanceState.getString("keyLyrics"); isFirstResume = lyrics == null;//from ww w .ja va 2s. com linearLoading.setVisibility(View.GONE); } else isFirstResume = true; isLoading = false; return view; }
From source file:com.example.android.opengl.OpenGLES20Activity.java
/** * @param immersiveFullScreen//from w w w . j a va 2 s.co m */ @TargetApi(Build.VERSION_CODES.JELLY_BEAN) private void setFullScreen(boolean isImmersive) { try { requestWindowFeature(Window.FEATURE_NO_TITLE); } catch (Exception e) { } try { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); if (isImmersive) { if (Build.VERSION.SDK_INT >= 19) { getWindow().getDecorView() .setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } else if (Build.VERSION.SDK_INT >= 16) { getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); } } else { if (Build.VERSION.SDK_INT >= 16) { getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); } } } catch (Throwable e) { } }
From source file:com.easemob.helpdeskdemo.ui.SatisfactionActivity.java
@Override protected void onCreate(Bundle arg0) { super.onCreate(arg0); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.em_activity_satisfaction); msgId = getIntent().getStringExtra("msgId"); initView();/*from www. ja va2 s . c o m*/ }
From source file:com.memetro.android.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_main); context = getApplicationContext();// www . j a v a2 s . c o m pdialog = new MemetroProgress(this); getStaticData(); register = (Button) findViewById(R.id.register); login = (Button) findViewById(R.id.login); usernameEt = (EditText) findViewById(R.id.username); passwordEt = (EditText) findViewById(R.id.password); recoverPassButton = (TextView) findViewById(R.id.recover_pass_button); recoverPassButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { showRecoverPassDialog(MainActivity.this); } }); User userData = dataUtils.getUserData(); if (userData != null) { usernameEt.setText(userData.username); passwordEt.requestFocus(); } register.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(context, PersonalActivity.class); startActivity(intent); } }); login.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { login(usernameEt.getText().toString(), passwordEt.getText().toString()); } }); }