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.ankit.touchreview.LoginActivity.java

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.login);//from w w w. ja  v  a 2 s.  c  o m

    mContext = this;
    mProcessing = new ProgressDialog(mContext);
    mProcessing.setCancelable(true);
    mProcessing.setMessage("Please Wait");
    mProcessing.setTitle("Logging in");
    mProcessing.setOnCancelListener(new OnCancelListener() {
        @Override
        public void onCancel(DialogInterface dialog) {
            if (logging_in) {
                Intent i = new Intent(LoginActivity.this, HomeActivity.class);
                startActivity(i);
                finish();
            }
        }
    });

    username = (TextView) findViewById(R.id.username);
    password = (TextView) findViewById(R.id.password);

    String token = Utility.getUserPrefernce(mContext, "token");
    if (token != null && !"".equals(token)) {
        Intent i = new Intent(LoginActivity.this, HomeActivity.class);
        startActivity(i);
        finish();
    }

    TextView thanking_text = (TextView) findViewById(R.id.thanking_text);
    thanking_text.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://touchtoreview.com/thankyou"));
            startActivity(myIntent);
        }
    });
}

From source file:com.bruce.study.demo.studydata.viewpage.ViewPagerActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    LayoutInflater inflater = getLayoutInflater();
    pageViews = new ArrayList<>(5);
    pageViews.add(inflater.inflate(R.layout.viewpager_item_01, null));
    pageViews.add(inflater.inflate(R.layout.viewpager_item_02, null));
    pageViews.add(inflater.inflate(R.layout.viewpager_item_03, null));
    pageViews.add(inflater.inflate(R.layout.viewpager_item_04, null));

    imageViews = new ImageView[pageViews.size()];
    ViewGroup main = (ViewGroup) inflater.inflate(R.layout.viewpager_activity, null);
    ViewGroup group = (ViewGroup) main.findViewById(R.id.ll_viewgroup);
    ViewPager viewPager = (ViewPager) main.findViewById(R.id.vp_guide);
    for (int i = 0; i < pageViews.size(); i++) {
        ImageView imageView = new ImageView(ViewPagerActivity.this);
        imageView.setLayoutParams(new ViewGroup.LayoutParams(20, 20));
        imageView.setPadding(20, 0, 20, 0);
        imageViews[i] = imageView;// w  ww.  j  a  v a 2  s .  c o  m
        if (i == 0) {
            imageViews[i].setBackgroundResource(R.drawable.viewpager_indicator_focused);
        } else {
            imageViews[i].setBackgroundResource(R.drawable.viewpage_indicator);
        }
        group.addView(imageViews[i]);
    }
    setContentView(main);
    viewPager.setAdapter(new MyViewPagerAdapter());
    viewPager.setOnPageChangeListener(new PageChangeListener());
}

From source file:com.memetro.android.register.CredentialsActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_register_credentials);
    context = getApplicationContext();/*w ww.ja  v a2  s .  c o  m*/
    OAuth = new OAuth(context);

    pdialog = new MemetroProgress(this);

    register = (Button) findViewById(R.id.register);
    usernameEt = (EditText) findViewById(R.id.username);
    passwordEt = (EditText) findViewById(R.id.password);
    repeatPasswordEt = (EditText) findViewById(R.id.repeat_password);
    spinnerCity = (Spinner) findViewById(R.id.spinnerCity);
    spinnerCountry = (Spinner) findViewById(R.id.spinnerCountry);

    List<Country> countries = DataUtils.getCountries();
    LayoutUtils.setDefaultSpinnerGrey(context, spinnerCountry, countries);

    spinnerCountry.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
        @Override
        public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
            Country country = (Country) adapterView.getAdapter().getItem(i);
            Log.d("PAIS", country.name);
            List<City> cities = DataUtils.getCities(country.countryId);
            LayoutUtils.setDefaultSpinnerGrey(context, spinnerCity, cities);
        }

        @Override
        public void onNothingSelected(AdapterView<?> adapterView) {

        }
    });

    Bundle extras = getIntent().getExtras();
    if (extras != null) {
        name = extras.getString("name");
        mail = extras.getString("mail");
        twitter = extras.getString("twitter");
        about = extras.getString("about");
    }

    register.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            username = usernameEt.getText().toString();
            password = passwordEt.getText().toString();
            repeatPassword = repeatPasswordEt.getText().toString();
            new AsyncRegister().execute();
        }
    });

}

From source file:com.ankit.touchreview.ActionsActivity.java

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.actions);//ww  w.  ja v a2s.  c om

    logo = (ImageView) findViewById(R.id.logo);

    LinearLayout1 = (LinearLayout) findViewById(R.id.LinearLayout1);
    mContext = this;

    message = (TextView) findViewById(R.id.message);

    DisplayMetrics metrics = this.getResources().getDisplayMetrics();
    int width = metrics.widthPixels;
    //int height = metrics.heightPixels;
    logo.getLayoutParams().width = width / 2;
    Button goodReview = (Button) findViewById(R.id.goodreview);
    goodReview.getLayoutParams().width = width / 3;
    Button badReview = (Button) findViewById(R.id.badreview);
    badReview.getLayoutParams().width = width / 3;

    mProcessing = new ProgressDialog(mContext);
    mProcessing.setCancelable(true);
    mProcessing.setMessage("Please Wait");
    mProcessing.setTitle("Fetching Details");
    setLogoImage();
    setThemeImage();
    setMessage();

    if (Utility.appmode != null && Utility.appmode > 1) {
        goodReview.setText("Give FeedBack");
        badReview.setText("Give Feedback");
        if (Utility.appmode == 2)
            badReview.setVisibility(View.GONE);
        if (Utility.appmode == 3)
            goodReview.setVisibility(View.GONE);
    }
}

From source file:org.akvo.flow.activity.AppUpdateActivity.java

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

    mUrl = getIntent().getStringExtra(EXTRA_URL);
    mVersion = getIntent().getStringExtra(EXTRA_VERSION);

    mProgress = (ProgressBar) findViewById(R.id.progress);
    mButton = (Button) findViewById(R.id.cancel_btn);

    mProgress.setMax(MAX_PROGRESS);// Values will be in percentage
    mButton.setOnClickListener(this);
}

From source file:biz.easymenu.easymenung.NoteDialog.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View v = li.inflate(R.layout.notedialog, container, false);

    WindowManager.LayoutParams WMLP = this.getDialog().getWindow().getAttributes();
    WMLP.y = 100; //y position
    WMLP.gravity = Gravity.TOP;//from www  .java 2  s.  c  om
    WMLP.windowAnimations = R.style.PauseDialogAnimation;
    this.getDialog().getWindow().setAttributes(WMLP);
    this.getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);

    etNote = (EditText) v.findViewById(R.id.txtNoteDlg);

    btnNoteOk = (Button) v.findViewById(R.id.btnNoteOK);
    btnNoteOk.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            itemFrag.setNote(etNote.getText().toString());
            InputMethodManager imm = (InputMethodManager) getActivity()
                    .getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.hideSoftInputFromWindow(etNote.getWindowToken(), 0);
            dismiss();
        }

    });

    btnNoteCancel = (Button) v.findViewById(R.id.btnNoteCancel);
    btnNoteCancel.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            InputMethodManager imm = (InputMethodManager) getActivity()
                    .getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.hideSoftInputFromWindow(etNote.getWindowToken(), 0);
            dismiss();
        }

    });

    etNote.setText(note);

    return v;
}

From source file:android.support.design.widget.BottomSheetDialog.java

protected BottomSheetDialog(@NonNull Context context, boolean cancelable, OnCancelListener cancelListener) {
    super(context, cancelable, cancelListener);
    supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
    mCancelable = cancelable;//from   w  w w .  j a  va2s .c o m
}

From source file:com.fjn.magazinereturncandidate.fragments.ProductDetailFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    formatCommon = new FormatCommon();
    registerLicenseCommon = new RegisterLicenseCommon();
    checkDataCommon = new CheckDataCommon();

    //Init custom product detail layout
    View rootView = inflater.inflate(R.layout.fragment_product_detail, container, false);
    if (getDialog().getWindow() != null) {
        getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    }/*from ww  w. ja v  a  2 s  .co  m*/

    //Get Id textview Product detail
    TextView txv_jan_cd = (TextView) rootView.findViewById(R.id.txv_jan_cd);
    TextView txv_group1_name = (TextView) rootView.findViewById(R.id.txv_group1_name);
    TextView txv_group2_name = (TextView) rootView.findViewById(R.id.txv_group2_name);
    TextView txv_product_name = (TextView) rootView.findViewById(R.id.txv_product_name);
    TextView txv_writer_name = (TextView) rootView.findViewById(R.id.txv_writer_name);
    TextView txv_publisher_name = (TextView) rootView.findViewById(R.id.txv_publisher_name);
    TextView txv_publish_date = (TextView) rootView.findViewById(R.id.txv_publish_date);
    TextView txv_price = (TextView) rootView.findViewById(R.id.txv_price);
    txv_inventory_number = (TextView) rootView.findViewById(R.id.txv_inventory_number);
    TextView txv_first_supply_date = (TextView) rootView.findViewById(R.id.txv_first_supply_date);
    TextView txv_last_supply_date = (TextView) rootView.findViewById(R.id.txv_last_supply_date);
    TextView txv_last_sales_date = (TextView) rootView.findViewById(R.id.txv_last_sales_date);
    TextView txv_last_order_date = (TextView) rootView.findViewById(R.id.txv_last_order_date);
    TextView txv_year_rank = (TextView) rootView.findViewById(R.id.txv_year_rank);
    //TextView txv_joubi = (TextView) rootView.findViewById(R.id.txv_joubi);
    TextView txv_total_sales = (TextView) rootView.findViewById(R.id.txv_total_sales);
    TextView txv_total_supply = (TextView) rootView.findViewById(R.id.txv_total_supply);
    TextView txv_total_return = (TextView) rootView.findViewById(R.id.txv_total_return);
    TextView txv_location_id = (TextView) rootView.findViewById(R.id.txv_location_id);
    Button btn_submit_edit = (Button) rootView.findViewById(R.id.btn_submit_edit);

    Bundle bundle = getArguments();
    if (bundle != null) {

        //Show year_rank
        String valueYearRank = bundle.getString(Constants.COLUMN_YEAR_RANK);
        String showYearRank;
        if (Constants.VALUE_MAX_YEAR_RANK.equals(valueYearRank)) {
            showYearRank = Constants.SHOW_MAX_YEAR_RANK;
        } else {
            showYearRank = String.format("%s?/%s", formatCommon.formatMoney(valueYearRank),
                    formatCommon.formatMoney(String.valueOf(bundle.getInt(Constants.COLUMN_MAX_YEAR_RANK))));
        }

        //Get bundle janCode
        String janCode = bundle.getString(Constants.COLUMN_JAN_CD);
        int lenJanCode = 0;
        String janCodeResult = "";
        if (janCode != null) {
            lenJanCode = janCode.length();
            janCodeResult = janCode.substring(0, lenJanCode - 5);
        }
        if (lenJanCode != Constants.JAN_18_CHAR) {
            janCodeResult = janCode;
        }
        txv_jan_cd.setText(janCodeResult);
        txv_group1_name.setText(bundle.getString(Constants.COLUMN_MEDIA_GROUP1_NAME));
        txv_group2_name.setText(bundle.getString(Constants.COLUMN_MEDIA_GROUP2_NAME));
        txv_product_name.setText(bundle.getString(Constants.COLUMN_GOODS_NAME));
        txv_writer_name.setText(bundle.getString(Constants.COLUMN_WRITER_NAME));
        txv_publisher_name.setText(bundle.getString(Constants.COLUMN_PUBLISHER_NAME));
        txv_publish_date.setText(
                formatCommon.formatDate(bundle.getString(Constants.COLUMN_SALES_DATE, Constants.BLANK)));
        if (Constants.BLANK.equals(bundle.getString(Constants.COLUMN_PRICE))) {
            txv_price.setText(Constants.BLANK);
        } else {
            txv_price.setText(String.format("%s%s", Constants.SYMBOL,
                    formatCommon.formatMoney((bundle.getString(Constants.COLUMN_PRICE)))));
        }
        if (bundle.getString(Constants.COLUMN_STOCK_COUNT) == null) {
            txv_inventory_number.setText("");
            txv_inventory_number.append(Constants.BLANK); //focus end text
        } else {
            txv_inventory_number.setText("");
            txv_inventory_number
                    .append(formatCommon.formatMoney(bundle.getString(Constants.COLUMN_STOCK_COUNT)));//focus end text
        }
        txv_first_supply_date.setText(
                formatCommon.formatDate(bundle.getString(Constants.COLUMN_FIRST_SUPPLY_DATE, Constants.BLANK)));
        txv_last_supply_date.setText(
                formatCommon.formatDate(bundle.getString(Constants.COLUMN_LAST_SUPPLY_DATE, Constants.BLANK)));
        txv_last_sales_date.setText(
                formatCommon.formatDate(bundle.getString(Constants.COLUMN_LAST_SALES_DATE, Constants.BLANK)));
        txv_last_order_date.setText(
                formatCommon.formatDate(bundle.getString(Constants.COLUMN_LAST_ORDER_DATE, Constants.BLANK)));
        txv_year_rank.setText(showYearRank);
        //txv_joubi.setText(formatJoubi(bundle.getString(Constants.COLUMN_JOUBI)));
        txv_total_sales.setText(formatCommon.formatMoney(bundle.getString(Constants.COLUMN_TOTAL_SALES)));
        txv_total_supply.setText(formatCommon.formatMoney(bundle.getString(Constants.COLUMN_TOTAL_SUPPLY)));
        txv_total_return.setText(formatCommon.formatMoney(bundle.getString(Constants.COLUMN_TOTAL_RETURN)));
        txv_location_id.setText(bundle.getString(Constants.COLUMN_LOCATION_ID));

        //get position
        positionEdit = bundle.getInt(Constants.POSITION_EDIT_PRODUCT);

        //get flag OCR
        flagSwitchOCR = getArguments().getString(Constants.FLAG_SWITCH_OCR);
    }

    loadItems();

    // Set adapter for combo box with array
    ArrayAdapter<String> adapter1 = new ArrayAdapter<>(getContext(), android.R.layout.simple_list_item_1, arr);

    // Set item selected
    adapter1.setDropDownViewResource(android.R.layout.simple_list_item_single_choice);

    // Set button click
    btn_submit_edit.setOnClickListener(this);

    hsmDecoder = HSMDecoder.getInstance(getActivity());
    return rootView;
}

From source file:com.zira.profile.GetProfile.java

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

    intailizeVariable();//w  ww.  j  a  v  a  2  s .co m
    clickListner();
    prefs = getSharedPreferences("Zira", MODE_PRIVATE);
    e = prefs.edit();
}

From source file:com.carapp.login.splashActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
    setContentView(R.layout.splash);/*from w  ww. jav a  2  s.c om*/
    context = this;

    if (Client.equals("none") || Branch.equals("none")) {
        getClientBranch();

    }

}