Example usage for android.view Window FEATURE_NO_TITLE

List of usage examples for android.view Window FEATURE_NO_TITLE

Introduction

In this page you can find the example usage for android.view Window FEATURE_NO_TITLE.

Prototype

int FEATURE_NO_TITLE

To view the source code for android.view Window FEATURE_NO_TITLE.

Click Source Link

Document

Flag for the "no title" feature, turning off the title at the top of the screen.

Usage

From source file:com.chatwingsdk.fragments.ProfileFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog dialog = super.onCreateDialog(savedInstanceState);
    dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
    return dialog;
}

From source file:cn.edu.sdu.online.activity.FragmentTabsPager.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    //setTheme(R.style.MainTheme);
    super.onCreate(savedInstanceState);
    LayoutInflater inflater = LayoutInflater.from(FragmentTabsPager.this);
    requestWindowFeature(Window.FEATURE_NO_TITLE);//??
    setContentView(R.layout.fragment_tabs_pager);
    mTabHost = (TabHost) findViewById(android.R.id.tabhost);//
    mTabHost.setup();/*from www .  ja va 2 s  . c o  m*/
    View storage = inflater.inflate(R.layout.tab_storage, null);//tab bar 

    View square = inflater.inflate(R.layout.tab_square, null);
    View shake = inflater.inflate(R.layout.tab_shake, null);
    View person = inflater.inflate(R.layout.tab_personal, null);

    mViewPager = (ViewPager) findViewById(R.id.pager);
    titlea = (TextView) findViewById(R.id.title);//

    messageBox = (ImageView) findViewById(R.id.messagebox);
    messageBox.setOnClickListener(new messageBoxListener());

    mTabsAdapter = new TabsAdapter(this, mTabHost, mViewPager);//?

    mTabsAdapter.addTab(mTabHost.newTabSpec("square")//f
            .setIndicator(square), SquareFragment.class, null);
    mTabsAdapter.addTab(mTabHost.newTabSpec("shake").setIndicator(shake), SearchFragment.class, null);
    mTabsAdapter.addTab(mTabHost.newTabSpec("storage").setIndicator(storage), SubContainer.class, null);
    mTabsAdapter.addTab(mTabHost.newTabSpec("person").setIndicator(person), PersonFragment.class, null);

    new Handler().postDelayed(new Runnable() {
        public void run() {
            createView();
        }
    }, 200);

    if (savedInstanceState != null) {
        mTabHost.setCurrentTabByTag(savedInstanceState.getString("tab"));
    }
    DisplayMetrics metric = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metric);
    width = metric.widthPixels; // ??
    height = metric.heightPixels; // ??

}

From source file:com.kevelbreh.steamchat.activity.AuthenticationActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_login_2);
    ButterKnife.inject(this);
    bindService(new Intent(this, SteamService.class), mConnection, Context.BIND_AUTO_CREATE);
    mAuthenticate.setOnClickListener(new View.OnClickListener() {
        @Override//from  w  w w .  j  a  v  a 2s  . c  o m
        public void onClick(View view) {
            authenticate();
        }
    });
}

From source file:com.aimfire.intro.IntroductionActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_introduction);

    // ViewPager and its adapters use support library
    // fragments, so use getSupportFragmentManager.
    mIntroCollectionPagerAdapter = new IntroCollectionPagerAdapter(getSupportFragmentManager());
    mViewPager = (ViewPager) findViewById(R.id.intro_pager);
    mViewPager.setAdapter(mIntroCollectionPagerAdapter);
    mViewPager.setPageTransformer(true, new ZoomOutPageTransformer());

    mNextBtn = (Button) findViewById(R.id.next_button);
    mSkipBtn = (Button) findViewById(R.id.skip_button);

    mNextBtn.setOnClickListener(new OnClickListener() {
        @Override/*from  w  w  w.  ja  v a 2s.  com*/
        public void onClick(View v) {
            int pageNum = mViewPager.getCurrentItem();

            if (pageNum == (NUM_PAGES - 1)) {
                //done
                updateIntroPrefs();
                setResult(Activity.RESULT_OK, null);
                finish();
            } else {
                mViewPager.setCurrentItem(pageNum + 1);
            }
        }
    });

    mSkipBtn.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            //done
            updateIntroPrefs();
            setResult(Activity.RESULT_CANCELED, null);
            finish();
        }
    });

    addDots();
    selectDot(0);

    sPageTitles = Arrays.asList(getResources().getStringArray(R.array.introPageTitles));
    sPageDesc = Arrays.asList(getResources().getStringArray(R.array.introPageDescs));
}

From source file:ch.gianulli.trelloapi.ui.AuthenticationDialogFragment.java

@Nullable
@Override/*from  w  w  w  .j av a  2  s .c o  m*/
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    if (getDialog() != null) {
        getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
    }

    View v = inflater.inflate(R.layout.dialog_authentication, container, false);

    mProgressIndicator = (ProgressBar) v.findViewById(R.id.progress_indicator);
    mWebView = (WebView) v.findViewById(R.id.webview);

    // Catch token
    mWebView.setWebViewClient(new WebViewClient() {

        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            setProgressIndicatorVisibility(true);
        }

        @Override
        public void onPageFinished(WebView view, String url) {
            setProgressIndicatorVisibility(false);
            if (url.equals(URL_TOKEN)) {
                // Get token and close dialog
                mWebView.loadUrl("javascript:window.HTMLOUT.parseHTML('<html>'+document"
                        + ".getElementsByTagName('html')[0].innerHTML+'</html>');");
            } else {
                super.onPageFinished(view, url);
            }
        }
    });
    WebSettings webSettings = mWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    mWebView.addJavascriptInterface(new MyJavaScriptInterface(), "HTMLOUT");
    mWebView.setVisibility(View.GONE);

    mWebView.setOnKeyListener(new View.OnKeyListener() {
        @Override
        public boolean onKey(View v, int keyCode, KeyEvent event) {
            if (event.getAction() == KeyEvent.ACTION_UP) {
                switch (keyCode) {
                case KeyEvent.KEYCODE_BACK:
                    if (mWebView.canGoBack()) {
                        mWebView.goBack();
                        return true;
                    }
                }

            }
            return false;
        }
    });

    // Load first page
    setProgressIndicatorVisibility(true);
    try {
        mWebView.loadUrl(URL_AUTHORIZATION + "key=" + mApi.getAppKey() + "&name="
                + URLEncoder.encode(getString(R.string.app_name), "UTF-8")
                + "&expiration=never&response_type=token&scope=read,write");
    } catch (UnsupportedEncodingException e) {
        // never happens
    }

    return v;
}

From source file:cc.metapro.openct.classdetail.ClassDetailActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);
    ButterKnife.bind(this);
    setSupportActionBar(mToolbar);/*from  w  w w  .  j av a2s.c  o m*/
}

From source file:com.alphabetbloc.accessmrs.ui.user.BaseUserListActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    if (!FileUtils.storageReady()) {
        UiUtils.toastAlert(this, getString(R.string.error_storage_title), getString(R.string.error_storage));
        setResult(RESULT_CANCELED);/* w w w  . jav a  2  s.com*/
        finish();
    }
    mToastCtx = this;
}

From source file:com.pax.pay.PaymentActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_null);

    Intent intent = getIntent();/*from   w ww.  j  a  v a2  s .c o m*/
    ActivityStack.getInstance().push(this);

    // check if neptune is installed
    isInstalledNeptune = Component.neptuneInstalled(this, new DialogInterface.OnDismissListener() {

        @Override
        public void onDismiss(DialogInterface arg0) {
            transFinish(new ActionResult(TransResult.ERR_ABORTED, null));
        }
    });

    if (!isInstalledNeptune) {
        return;
    }
    FinancialApplication.mApp.initManagers();
    Device.enableStatusBar(false);
    Device.enableHomeRecentKey(false);

    try {
        String jsonStr = intent.getExtras().getString(REQUEST);
        json = new JSONObject(jsonStr);
    } catch (Exception e) {
        transFinish(new ActionResult(TransResult.ERR_PARAM, null));
        return;
    }

    initDev();
}

From source file:de.teambluebaer.patientix.activities.StartActivity.java

/**
 * OnCreation of the Activity this method runs and removes the titlebar and
 * set the application to fullscreen mode.
 * After the Layout is created all view who have to be changed are referenced.
 *
 * @param savedInstanceState default parameter
 *//*from   ww  w.j a  v a2 s .  co  m*/
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);

    Constants.TORESTART = false;
    setContentView(R.layout.activity_start);
    Constants.LISTOFACTIVITIES.add(this);
    Constants.CURRENTACTIVITY = this;
    PrefUtils.setKioskModeActive(true, this);

    buttonStart = (Button) findViewById(R.id.buttonStart);
    textViewPatientName = (TextView) findViewById(R.id.textViewPatientName);
    textViewPatientBirth = (TextView) findViewById(R.id.textViewPatientBirthDate);
    textViewExameName = (TextView) findViewById(R.id.textViewExamination);
    InsertConfig.getConfig();

    new GetTabletID().execute();
}

From source file:au.com.dektech.dektalk.MainActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Set window styles for fullscreen-window size. Needs to be done before
    // adding content.
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN
            | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
            | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
            | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
    getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);

    setContentView(R.layout.activity_main);

    // initialize UI
    btnDial = (Button) findViewById(R.id.button_dial);
    btnDial.setOnClickListener(this);
    btnHangup = (Button) findViewById(R.id.button_hangup);
    btnHangup.setOnClickListener(this);
}