@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    back = (ImageView) findViewById(R.id.back);
    loginTitle = (TextView) findViewById(R.id.title);
    signIn = (Button) findViewById(R.id.signin);
    registerButton = (Button) findViewById(R.id.register);
    forgetPassword = (TextView) findViewById(R.id.forget);
    username = (EditText) findViewById(R.id.username);
    password = (EditText) findViewById(R.id.password);

    userType = getIntent().getStringExtra("user");
    back.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            finish();
          }
        });

    loginTitle.setText(userType + " Login");
    loginTitle.setTypeface(PrefUtils.getNexaLight(LoginActivity.this));
    username.setTypeface(PrefUtils.getNexaLight(LoginActivity.this));
    password.setTypeface(PrefUtils.getNexaLight(LoginActivity.this));
    signIn.setTypeface(PrefUtils.getNexaLight(LoginActivity.this));
    forgetPassword.setTypeface(PrefUtils.getNexaLight(LoginActivity.this));
    registerButton.setTypeface(PrefUtils.getNexaBold(LoginActivity.this));

    signIn.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            if (validationDone()) {
              callWebService(userEmail, userPassword, userType);
            }
            //                Functions.fireIntent(LoginActivity.this, MyDrawerActivity.class);
          }
        });

    registerButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Intent i = new Intent(LoginActivity.this, RegisterActivity.class);
            i.putExtra("user", userType);
            startActivity(i);
          }
        });

    forgetPassword.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Intent i = new Intent(LoginActivity.this, ForgotPassword.class);
            i.putExtra("user", userType);
            startActivity(i);
          }
        });
  }
 private void initialize(View fragmentView, Context context) {
   ButterKnife.bind(this, fragmentView);
   Typeface robotoBlack = Typeface.createFromAsset(context.getAssets(), "fonts/Roboto-Black.ttf");
   txtGuideLine.setTypeface(robotoBlack);
   Typeface robotoCondensedLight =
       Typeface.createFromAsset(context.getAssets(), "fonts/RobotoCondensed-Light.ttf");
   edtNidName.setTypeface(robotoCondensedLight);
   edtNidBirthDate.setTypeface(robotoCondensedLight);
   edtNidNo.setTypeface(robotoCondensedLight);
   fab.setOnClickListener(fabOnClickListener);
   edtNidBirthDate.setOnClickListener(
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {
           showDialog();
         }
       });
   imgDatePicker.setOnClickListener(
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {
           showDialog();
         }
       });
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_forget_password);
    iv_logo = (ImageView) this.findViewById(R.id.iv_logo);
    img_background = (ImageView) this.findViewById(R.id.img_background);
    resizeLogo();
    fontManager = FontManager.getInstance(getAssets());
    ed_email = (EditText) this.findViewById(R.id.ed_email);
    ed_email
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);
    ed_new_password = (EditText) this.findViewById(R.id.ed_new_password);
    ed_new_password
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);
    ed_repassword = (EditText) this.findViewById(R.id.ed_repassword);
    ed_repassword
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);

    ed_email.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));
    ed_new_password.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));
    ed_repassword.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));

    btn_update_password = (Button) this.findViewById(R.id.btn_update_password);
    btn_update_password = (Button) this.findViewById(R.id.btn_update_password);
    btn_update_password.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            String email = ed_email.getText().toString().trim();
            String password = ed_new_password.getText().toString();
            String repassword = ed_repassword.getText().toString();
            if (verifyInputs(email, password, repassword)) {
              v.startAnimation(animFade);
              update_password(email, password);
            }
          }
        });
    btn_update_password.setTypeface(fontManager.getFont(FontManager.ROBOTO_MEDIUM));
    iv_back = (ImageView) this.findViewById(R.id.iv_back);
    iv_back.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            onBackPressed();
          }
        });
    ll_parent = (CoordinatorLayout) this.findViewById(R.id.ll_parent);
    ll_parent.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            hideSoftKeyboard();
          }
        });
    mValidator = Validator.getInstance();
    animFade = AnimationUtils.loadAnimation(ForgetPassword.this, R.anim.fade);
  }
Example #4
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    presenter = new LoginPresenter(this, new LoginService(this));

    // register buttonn
    Login_OnClickButtonListener();
    ClearDB_OnClickButtonListener();
    RegistrationLink_OnClickListener();

    // text handles
    header = (TextView) findViewById(R.id.textView_header);
    username = (EditText) findViewById(R.id.editText_username);
    password = (EditText) findViewById(R.id.editText_password);

    Typeface type = Typeface.createFromAsset(getAssets(), "fonts/Sansation-LightItalic.ttf");
    Typeface glyphicons = Typeface.createFromAsset(getAssets(), "fonts/fontawesome-webfont.ttf");

    // initialize values
    header.setTypeface(type);

    username.setText("");
    username.setTypeface(glyphicons);
    username.setHint("  \uf007    Username");

    password.setText("");
    password.setTypeface(glyphicons);
    password.setHint("  \uf023    Password");
  }
  private void initview() {
    text_dob = (TextView) findViewById(R.id.signup_dob);
    text_dob.setTypeface(font_style);

    edit_firstname = (EditText) findViewById(R.id.signup_firstname);
    edit_firstname.setTypeface(font_style);

    edit_lastname = (EditText) findViewById(R.id.signup_lastname);
    edit_lastname.setTypeface(font_style);

    edit_username = (EditText) findViewById(R.id.signup_username);
    edit_username.setTypeface(font_style);

    edit_password = (EditText) findViewById(R.id.signup_password);

    edit_email = (EditText) findViewById(R.id.signup_Email);
    edit_email.setTypeface(font_style);

    spinner_gender = (Spinner) findViewById(R.id.signup_gender);

    terms = (TextView) findViewById(R.id.signup_termsandconditions);
    terms.setTypeface(font_style);

    join = (Button) findViewById(R.id.signup_join);

    terms_check = (CheckBox) findViewById(R.id.signup_checkbox_terms);

    calendar = Calendar.getInstance();
  }
Example #6
0
  private void setTypeface() {

    name.setTypeface(bariol_regular_tf);
    website.setTypeface(bariol_regular_tf);
    bio.setTypeface(bariol_regular_tf);
    email.setTypeface(bariol_regular_tf);
    phoneNumber.setTypeface(bariol_regular_tf);
  }
Example #7
0
  public void onCreate(Bundle savedInstanceState) {
    try {

      setTheme(General.CurTheme);
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_me);

      call_me = (EditText) findViewById(R.id.call_me);
      my_strength = (EditText) findViewById(R.id.my_strength);
      my_weakness = (EditText) findViewById(R.id.my_weakness);
      words = (EditText) findViewById(R.id.words);
      change = (EditText) findViewById(R.id.change);

      update = (Button) findViewById(R.id.updateme);
      record = (Button) findViewById(R.id.record);
      stopRecord = (Button) findViewById(R.id.stopRecording);
      play = (Button) findViewById(R.id.play);
      stopPlay = (Button) findViewById(R.id.stopPlaying);

      update.setOnClickListener(this);
      record.setOnClickListener(this);
      stopRecord.setOnClickListener(this);
      stopPlay.setOnClickListener(this);
      play.setOnClickListener(this);

      Typeface attribute = Typeface.createFromAsset(getAssets(), "editfont.ttf");
      call_me.setTypeface(attribute);
      my_strength.setTypeface(attribute);
      my_weakness.setTypeface(attribute);
      words.setTypeface(attribute);
      change.setTypeface(attribute);

      InputFilter filter =
          new InputFilter() {
            @Override
            public CharSequence filter(
                CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
              for (int i = start; i < end; i++) {
                if (!Character.isLetterOrDigit(source.charAt(i))
                    && !Character.isSpaceChar(source.charAt(i))) {
                  return " ,";
                }
              }
              return null;
            }
          };

      call_me.setFilters(new InputFilter[] {filter});
      my_strength.setFilters(new InputFilter[] {filter});
      my_weakness.setFilters(new InputFilter[] {filter});
      words.setFilters(new InputFilter[] {filter});
      change.setFilters(new InputFilter[] {filter});
    } catch (Exception ex) {
      Log.i("MeAct Error", ex.toString());
    }
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    position = getArguments().getInt(ARG_SECTION_NUMBER);

    if (position == 0) {

      initKeyParticleMap();

      rootView = inflater.inflate(R.layout.fragment_keyboard_particles, container, false);

      mp = MediaPlayer.create(getActivity(), R.raw.type_sound);

      outEditText = (EditText) rootView.findViewById(R.id.edit);

      Typeface font = Typeface.createFromAsset(getActivity().getAssets(), "Adler.ttf");
      outEditText.setTypeface(font);
    } else if (position == 1) {

      initStarWarParticleMap();

      rootView = inflater.inflate(R.layout.fragment_star_wars, container, false);

      outEditText = (EditText) rootView.findViewById(R.id.edit);

      mp = MediaPlayer.create(getActivity(), R.raw.laser);

      Typeface font = Typeface.createFromAsset(getActivity().getAssets(), "Starjout.ttf");

      outEditText.setTypeface(font);

    } else if (position == 2) {

      initBubbleParticleMap();

      rootView = inflater.inflate(R.layout.fragment_bubble_particles, container, false);

      mp = MediaPlayer.create(getActivity(), R.raw.type_sound);

      outEditText = (EditText) rootView.findViewById(R.id.edit);
    }

    FABRevealLayout fabRevealLayout =
        (FABRevealLayout) rootView.findViewById(R.id.fab_reveal_layout);
    configureFABReveal(fabRevealLayout);

    setUpLayout();

    return rootView;
  }
Example #9
0
  private void initSearchComponent() {
    //		etSearch = (EditText) mView.findViewById(R.id.etHomeSearch);
    etSearch = new EditText(getActivity());
    Drawable drawable = getResources().getDrawable(R.drawable.search_white);
    drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
    etSearch.setCompoundDrawables(drawable, null, null, null);
    etSearch.setTypeface(StringUtil.getTypeFaceByRegular(getActivity()));
    etSearch.setFocusable(true);
    etSearch.setHint(R.string.eventName);
    etSearch.setFocusableInTouchMode(true);
    LayoutParams params = etSearch.getLayoutParams();
    if (params == null) {
      params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
    }
    params.height = LayoutParams.WRAP_CONTENT;
    params.width = LayoutParams.MATCH_PARENT;
    etSearch.setLayoutParams(params);
    LinearLayout llSearch = new LinearLayout(getActivity());
    llSearch.setPadding(3, 3, 3, 3);
    llSearch.addView(etSearch);
    plvManage.getRefreshableView().addHeaderView(llSearch);
    etSearch.addTextChangedListener(
        new TextWatcher() {
          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
            mManageAdapter.filterEventsByText(s.toString());
          }

          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after) {}

          @Override
          public void afterTextChanged(Editable s) {}
        });
  }
  @Override
  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.main_login);

    mEtAccount = (EditText) findViewById(R.id.mainLoginEditAccount);
    mEtPassword = (EditText) findViewById(R.id.mainLoginEditPassword);
    mBtnLogin = (Button) findViewById(R.id.mainLoginBtn);
    mBtnRegister = (Button) findViewById(R.id.main_btn_register);

    /* this is to render the password edittext font to be default */
    mEtPassword.setTypeface(Typeface.DEFAULT);
    mEtPassword.setTransformationMethod(new PasswordTransformationMethod());

    mBtnLogin.setOnClickListener(
        new OnClickListener() {
          public void onClick(View v) {
            MainActivity.this.tryLogin();
          }
        });

    mBtnRegister.setOnClickListener(
        new OnClickListener() {
          public void onClick(View v) {
            Intent intent0 = new Intent(MainActivity.this, RegisterActivity.class);
            startActivity(intent0);
          }
        });
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.interpreter_log, container, false);

    expressionEntry = (EditText) rootView.findViewById(R.id.expression_entry);
    Typeface typeface = Typeface.createFromAsset(getActivity().getAssets(), "fonts/FreeMono.ttf");
    expressionEntry.setTypeface(typeface);

    resultList = (ListView) rootView.findViewById(R.id.result_list_view);
    resultListAdapter = new ResultListAdapter(getActivity(), inflater, typeface);
    resultList.setAdapter(resultListAdapter);
    resultList.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            resultEntryClicked(position);
          }
        });
    resultListAdapter.registerDataSetObserver(new ResultUpdatedObserver());

    Button sendButton = (Button) rootView.findViewById(R.id.send_expr_button);
    sendButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            sendClicked();
          }
        });

    return rootView;
  }
Example #12
0
  private void showUserHashDialog() {
    String userHash = NavigineApp.Settings.getString("user_hash", "");

    LayoutInflater inflater = getLayoutInflater();
    View view = inflater.inflate(R.layout.user_hash_dialog, null);
    _userEdit = (EditText) view.findViewById(R.id.user_hash_edit);
    _userEdit.setText(userHash);
    _userEdit.setTypeface(Typeface.MONOSPACE);
    // _userEdit.addTextChangedListener(new TextWatcher()
    //  {
    //    public void afterTextChanged(Editable s) { }
    //    public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
    //    public void onTextChanged(CharSequence s, int start, int before, int count)
    //    {
    //      String text = _userEdit.getText().toString();
    //      int length  = _userEdit.getText().length();
    //
    //      if (text.endsWith("-"))
    //        return;
    //
    //      if (count <= before)
    //        return;
    //
    //      if (length == 4 || length == 9 || length == 14)
    //      {
    //        _userEdit.setText((text + "-"));
    //        _userEdit.setSelection(length + 1);
    //      }
    //    }
    //  });

    AlertDialog.Builder alertBuilder = new AlertDialog.Builder(mContext);
    alertBuilder.setView(view);
    alertBuilder.setTitle("Enter user ID");
    alertBuilder.setNegativeButton(
        getString(R.string.cancel_button),
        new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dlg, int id) {}
        });

    alertBuilder.setPositiveButton(
        getString(R.string.ok_button),
        new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dlg, int id) {
            String userHash = _userEdit.getText().toString();
            SharedPreferences.Editor editor = NavigineApp.Settings.edit();
            editor.putString("user_hash", userHash);
            editor.commit();
            NavigineApp.applySettings();
            refreshMapList();
          }
        });

    AlertDialog dialog = alertBuilder.create();
    dialog.setCanceledOnTouchOutside(false);
    dialog.show();
  }
 public static TextView applyNoteViewAttrs(Context context, EditText noteView, CharSequence text) {
   TextPaint paint = noteView.getPaint();
   paint.setFlags(TextPaint.ANTI_ALIAS_FLAG);
   noteView.setTypeface(Typeface.createFromAsset(context.getAssets(), "comic.ttf"));
   noteView.setText(text);
   Selection.removeSelection(noteView.getText());
   return noteView;
 }
Example #14
0
  public void loadActivity() {
    setContentView(R.layout.activity_search_screen);
    EditText e1 = (EditText) findViewById(R.id.country);
    TextView e2 = (TextView) findViewById(R.id.min_price);
    TextView e3 = (TextView) findViewById(R.id.max_price);
    TextView e4 = (TextView) findViewById(R.id.startDate1);
    TextView e5 = (TextView) findViewById(R.id.startDate2);
    TextView e6 = (TextView) findViewById(R.id.endDate1);
    TextView e7 = (TextView) findViewById(R.id.endDate2);
    Button e8 = (Button) findViewById(R.id.get_check_in);
    Button e9 = (Button) findViewById(R.id.get_check_out);
    Button e10 = (Button) findViewById(R.id.ext_search);
    Button e11 = (Button) findViewById(R.id.search);

    Typeface face = Typeface.createFromAsset(getAssets(), "Raleway-Light.ttf");
    /*if(getLang().equals("EN")){
    	face = Typeface.createFromAsset(getAssets(), "Raleway-Light.ttf");
    }else
    	face = Typeface.createFromAsset(getAssets(), "OpenSans-Light.ttf");*/
    final ViewGroup layout = (ViewGroup) findViewById(R.id.main_layout);

    e1.setTypeface(face);
    e2.setTypeface(face);
    e3.setTypeface(face);
    e4.setTypeface(face);
    e5.setTypeface(face);
    e6.setTypeface(face);
    e7.setTypeface(face);
    e8.setTypeface(face);
    e9.setTypeface(face);
    e10.setTypeface(face);
    e11.setTypeface(face);

    String[] spin_arry = getResources().getStringArray(R.array.tour_types);
    this.mAdapter = new CustomArrayAdapter<CharSequence>(this, spin_arry);
    Spinner spinner = (Spinner) findViewById(R.id.tour_type);
    spinner.setAdapter(this.mAdapter);

    final RangeSeekBar<Integer> seekBar = new RangeSeekBar<Integer>(0, 2000, getBaseContext());
    seekBar.setPadding(0, 0, 0, 0);
    seekBar.setOnRangeSeekBarChangeListener(
        new OnRangeSeekBarChangeListener<Integer>() {
          @Override
          public void onRangeSeekBarValuesChanged(
              RangeSeekBar<?> bar, Integer minValue, Integer maxValue) {
            // handle changed range values
            TextView minPrice = (TextView) findViewById(R.id.min_price);
            TextView maxPrice = (TextView) findViewById(R.id.max_price);
            minPrice.setText(minValue + "$");
            maxPrice.setText(maxValue + "$");

            Log.i(null, "User selected new range values: MIN=" + minValue + ", MAX=" + maxValue);
          }
        });

    layout.addView(seekBar, 3);
  }
 private void setDescriptionTypeface() {
   inviteTitleDesc.setTypeface(TypefaceUtil.PROXIMA_NOVA);
   inviteLocationDesc.setTypeface(TypefaceUtil.PROXIMA_NOVA);
   inviteDateDesc.setTypeface(TypefaceUtil.PROXIMA_NOVA);
   inviteTimeDesc.setTypeface(TypefaceUtil.PROXIMA_NOVA);
   inviteDateDesc.setTypeface(TypefaceUtil.PROXIMA_NOVA);
   inviteReminderDesc.setTypeface(TypefaceUtil.PROXIMA_NOVA);
   inviteNote.setTypeface(TypefaceUtil.PROXIMA_NOVA);
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.forgot_password);

    // getting url from resources
    urlResetPassword = getResources().getString(R.string.urlResetPassword);
    urlGetTestQuestion = getResources().getString(R.string.urlGetTestQuestion);

    // Edit Text
    txtTestQuestion = (TextView) findViewById(R.id.resetPassTestQuestion);
    txtTestAnswer = (EditText) findViewById(R.id.resetPassTestAnswer);
    btnResetPassword = (Button) findViewById(R.id.btnResetPassword);

    // setting the font type from assets
    typeFace = Typeface.createFromAsset(getAssets(), "fonts/KELMSCOT.ttf");
    txtTestQuestion.setTypeface(typeFace);
    txtTestAnswer.setTypeface(typeFace);
    btnResetPassword.setTypeface(typeFace);

    ((TextView) findViewById(R.id.pref1)).setTypeface(typeFace);
    ((TextView) findViewById(R.id.pref2)).setTypeface(typeFace);

    // getting userName from intent
    Intent intent = getIntent();

    // getting data past from intent
    userName = intent.getStringExtra("userName");

    // loading the test question
    new LoadTestQuestion().execute();

    // button click event
    btnResetPassword.setOnClickListener(
        new View.OnClickListener() {

          @Override
          public void onClick(View view) {

            // log.d(" inside create account=", "inside onclick");

            testAnswer = txtTestAnswer.getText().toString();
            String msg = "";
            boolean incomplete = false;

            if (testAnswer.matches("")) {
              msg = getString(R.string.pEnterTestQAns);
              incomplete = true;
            } else {
              new ResetPassword().execute();
            }

            if (incomplete) Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();
          }
        });
  }
Example #17
0
 private void findViews() {
   manageProtestList = (ListView) findViewById(R.id.manageListProtests);
   manageNotLoggedText = (TextView) findViewById(R.id.manageNotLoggedText);
   noProtestsOnManageText = (TextView) findViewById(R.id.manageNoProtests);
   manageTtl = (TextView) findViewById(R.id.manageTtl);
   manageTtl.setTypeface(Consts.appFont);
   noProtestsOnManageText.setTypeface(Consts.appFont);
   logOrReg = (Button) findViewById(R.id.manageLogReg);
   newProtestBtn = (ImageButton) findViewById(R.id.manageNewProtestBtn);
   manageBody = (RelativeLayout) findViewById(R.id.managePageBody);
   manageNewProtest = (RelativeLayout) findViewById(R.id.managePageNewProtestLayout);
   pNameEdit = (EditText) findViewById(R.id.enterProtestTitle);
   pNameEdit.setTypeface(Consts.appFont);
   pDescEdit = (EditText) findViewById(R.id.enterProtestDescription);
   pDescEdit.setTypeface(Consts.appFont);
   doneBtn = (Button) findViewById(R.id.enterDone);
   ((TextView) findViewById(R.id.addProtestTtl)).setTypeface(Consts.appFont);
   ((Button) findViewById(R.id.enterDone)).setTypeface(Consts.appFont);
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_update_profile);

    user = User.getCurrentUser();
    dbConn = DatabaseConnection.getInstance();
    res = getResources();

    Typeface customTypeface = Typeface.createFromAsset(getAssets(), Globals.FONT_ROBOTO_THIN);
    Typeface customBold = Typeface.create(customTypeface, Typeface.BOLD);

    TextView txtLogoUpdateProfile = (TextView) findViewById(R.id.txt_logo_update_profile_title);
    txtLogoUpdateProfile.setTypeface(customBold);

    inputLayoutLastName = (TextInputLayout) findViewById(R.id.input_layout_last_name);
    txtInputLastName = (EditText) findViewById(R.id.txt_input_last_name);
    txtInputLastName.setTypeface(customBold);

    inputLayoutFirstName = (TextInputLayout) findViewById(R.id.input_layout_first_name);
    txtInputFirstName = (EditText) findViewById(R.id.txt_input_first_name);
    txtInputFirstName.setTypeface(customBold);

    //        inputLayoutPhoneNumber = (TextInputLayout)
    // findViewById(R.id.input_layout_phone_number);
    txtInputPhoneNumber = (EditText) findViewById(R.id.txt_input_phone_number);
    txtInputPhoneNumber.setTypeface(customBold);

    inputLayoutConfirmPassword = (TextInputLayout) findViewById(R.id.input_layout_confirm_password);
    txtInputConfirmPassword = (EditText) findViewById(R.id.txt_input_confirm_password);
    txtInputConfirmPassword.setTypeface(customBold);

    spinnerInsuranceProviders = (Spinner) findViewById(R.id.spinner_insurance_providers);
    spinnerInsuranceProviders.setOnItemSelectedListener(this);

    pickerDOB = (DatePicker) findViewById(R.id.picker_dob);
    pickerHeightFeet = (NumberPicker) findViewById(R.id.picker_height_feet);
    pickerHeightInch = (NumberPicker) findViewById(R.id.picker_height_inch);
    pickerWeight = (NumberPicker) findViewById(R.id.picker_weight);

    btnUpdateProfile = (Button) findViewById(R.id.btn_update);
  }
Example #19
0
  /** Initializing UIs */
  private void initUI() {

    mEdtUserName = (EditText) findViewById(R.id.editTextLoginUserName);

    mEdtPassword = (EditText) findViewById(R.id.editTextLoginPassword);

    mllUserName = (LinearLayout) findViewById(R.id.llLoginUserName);

    mllPassword = (LinearLayout) findViewById(R.id.llLoginPassword);

    mBtnLogin = (Button) findViewById(R.id.buttonLoginSubmit);

    mTxtvForgotPassword = (TextView) findViewById(R.id.textViewLoginForgotPassword);
    mEdtUserName.setTypeface(AppUtils.getTypeFace(LoginActivity.this));
    mEdtPassword.setTypeface(AppUtils.getTypeFace(LoginActivity.this));

    mBtnLogin.setOnClickListener(this);
    mTxtvForgotPassword.setOnClickListener(this);
    applyValidationFilters();
  }
 /** 初始化地址输入按钮 */
 private void initLocationButton() {
   if (etLocation == null) {
     etLocation = (EditText) findViewById(R.id.etAddEventLocation);
     etLocation.setTypeface(StringUtil.getTypeFaceByRegular(mContext));
     etLocation.setFocusable(false);
     if (event != null) {
       etLocation.setText(event.getLocation());
     }
     etLocation.setOnClickListener(new OpenInputLocationOnClick());
   }
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_conference_code);

    btn_cancel = (Button) findViewById(R.id.button_cancel);
    txt_code = (TextView) findViewById(R.id.textView_conference_code);
    edit_code = (EditText) findViewById(R.id.editText_code);
    btn_join_in = (Button) findViewById(R.id.button_join_in);

    btn_cancel.setTypeface(Global.face, Typeface.BOLD);
    txt_code.setTypeface(Global.face);
    edit_code.setTypeface(Global.face, Typeface.BOLD);
    btn_join_in.setTypeface(Global.face, Typeface.BOLD);

    btn_cancel.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            finish();
            Intent intent = new Intent(JoinConferenceActivity.this, MainActivity.class);
            startActivity(intent);
          }
        });

    btn_join_in.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            if (edit_code.getText().toString().length() > 0) {
              progressView.setVisibility(0);
              disableButtons();

              JoinConf joinConf = new JoinConf(edit_code.getText().toString());
              joinConf.execute();
            } else {
              Toast.makeText(
                      JoinConferenceActivity.this,
                      "Please input conference code.",
                      Toast.LENGTH_LONG)
                  .show();
            }
            Log.d(TAG, "Any Conference!");
          }
        });

    progressView = (FrameLayout) findViewById(R.id.progressView);
    progressView.setVisibility(4);
  }
Example #22
0
  void applyPreferences() {
    // InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_CLASS_TEXT |
    // InputType.TYPE_TEXT_FLAG_MULTI_LINE
    mText.setInputType(
        InputType.TYPE_TEXT_FLAG_MULTI_LINE
            | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
            | InputType.TYPE_TEXT_VARIATION_NORMAL
            | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
            | InputType.TYPE_CLASS_TEXT);
    // ScrollView mScrollView = (ScrollView) this.findViewById(R.id.scrollView);

    TPApplication.instance.updateSettings();
    SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
    /** ****************************** font face */
    String font = sharedPref.getString("font", "Monospace");

    if (font.equals("Serif")) mText.setTypeface(Typeface.SERIF);
    else if (font.equals("Sans Serif")) mText.setTypeface(Typeface.SANS_SERIF);
    else mText.setTypeface(Typeface.MONOSPACE);

    /** ****************************** font size */
    String fontsize = sharedPref.getString("fontsize", "Medium");

    if (fontsize.equals("Extra Small")) mText.setTextSize(12.0f);
    else if (fontsize.equals("Small")) mText.setTextSize(16.0f);
    else if (fontsize.equals("Medium")) mText.setTextSize(20.0f);
    else if (fontsize.equals("Large")) mText.setTextSize(24.0f);
    else if (fontsize.equals("Huge")) mText.setTextSize(28.0f);
    else mText.setTextSize(20.0f);

    /** ****************************** Colors */
    int bgcolor = sharedPref.getInt("bgcolor", 0xFFCCCCCC);
    // mScrollView.setBackgroundColor(bgcolor);
    mText.setBackgroundColor(bgcolor);

    int fontcolor = sharedPref.getInt("fontcolor", 0xFF000000);
    mText.setTextColor(fontcolor);

    // title.setTextColor(bgcolor);
    // title.setBackgroundColor(fontcolor);
  }
Example #23
0
  @AfterViews
  public void listViewSetting() {

    Typeface typeFace =
        Typeface.createFromAsset(getActivity().getAssets(), "fonts/OpenSans-Regular.ttf");
    findByCityOrName.setTypeface(typeFace);
    inputSearch.setTypeface(typeFace);
    textViewNoResult.setTypeface(typeFace);

    footer = getActivity().getLayoutInflater().inflate(R.layout.refresh_list_view, null);

    listViewMembers.setOnScrollListener(
        new AbsListView.OnScrollListener() {
          private int currentVisibleItemCount;
          private int currentScrollState;
          private int currentFirstVisibleItem;
          private int totalItem;

          @Override
          public void onScrollStateChanged(AbsListView view, int scrollState) {
            this.currentScrollState = scrollState;
            this.isScrollCompleted();
          }

          @Override
          public void onScroll(
              AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {

            this.currentFirstVisibleItem = firstVisibleItem;
            this.currentVisibleItemCount = visibleItemCount;
            this.totalItem = totalItemCount;
          }

          private void isScrollCompleted() {
            if (totalItem - currentFirstVisibleItem == currentVisibleItemCount
                && this.currentScrollState == SCROLL_STATE_IDLE) {

              if (!onRefresh) {
                if (!noMoreMembers) {
                  onRefresh = true;
                  if (!inputSearch.getText().toString().isEmpty())
                    searchForMembersByPaginationService(inputSearch.getText().toString());
                  else {
                    listAllMembersByPaginationService();
                  }
                  lastPosition = listViewMembers.getLastVisiblePosition();
                  listViewMembers.addFooterView(footer);
                }
              }
            }
          }
        });
  }
Example #24
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.add_text);

    helper = new NotesHelper(this);

    textTitle = (EditText) findViewById(R.id.textTitle);
    textContent = (EditText) findViewById(R.id.textContent);
    date = (TextView) findViewById(R.id.grandDate);
    day = (TextView) findViewById(R.id.grandDay);
    dayEntries = (TextView) findViewById(R.id.dateEntries);
    Date theDate = Calendar.getInstance().getTime();
    SimpleDateFormat dateFormat = new SimpleDateFormat("dd");
    SimpleDateFormat dayFormat = new SimpleDateFormat("EEE");
    String dayInNum = dateFormat.format(theDate);
    String dayInLet = dayFormat.format(theDate);
    System.out.println(dayInNum);
    System.out.println(dayInLet);

    date.setText(dayInNum);
    day.setText(dayInLet.toUpperCase());
    Typeface mvboli = Typeface.createFromAsset(getAssets(), "architect.ttf");
    textContent.setTypeface(mvboli);
    textTitle.setTypeface(mvboli);
    // textTitle.setHintTextColor();

    save = (Button) findViewById(R.id.save);

    restaurantId = getIntent().getStringExtra(Scribbler.ID_EXTRA);
    ID = getIntent().getLongExtra("ID", 1);
    System.out.println(ID);
    if (restaurantId != null) {
      load();
    }

    save.setOnClickListener(this);
  }
Example #25
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_try_font, container, false);
    ButterKnife.bind(this, view);

    getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);

    title.setText(fontPackage.getName());
    input.setTypeface(fontPackage.getTypeface(style, getActivity()));

    return view;
  }
Example #26
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();
    final Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/Roboto-Black.ttf");
    switch (item.getItemId()) {
      case R.id.btnEdit:
        if (deviceMac.length() > 0) {
          AlertDialog.Builder builder = new AlertDialog.Builder(context);
          builder.setTitle(R.string.editar);

          final EditText input = new EditText(context);

          input.setInputType(InputType.TYPE_CLASS_TEXT);
          input.setTypeface(typeface);
          if (activeWindow != 0) {
            input.setFilters(new InputFilter[] {new InputFilter.LengthFilter(8)});
            input.setHint(R.string.cambiarGrupo);
          } else {
            input.setFilters(new InputFilter[] {new InputFilter.LengthFilter(15)});
            input.setHint(R.string.cambiarGeneral);
          }
          builder.setView(input);

          builder.setPositiveButton(
              "Aceptar",
              new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                  String newName = input.getText().toString();
                  if (newName.length() > 0 && !newName.equals("AW Lumina"))
                    updateDataBaseName(newName);
                  else dialog.cancel();
                }
              });
          builder.setNegativeButton(
              "Cancelar",
              new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                  dialog.cancel();
                }
              });
          builder.show();
        }
        return true;
      case R.id.action_settings:
        return true;
    }
    return super.onOptionsItemSelected(item);
  }
Example #27
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    this.setContentView(R.layout.tget); // Layouts xmls exist for both landscape or portrait modes

    Intent intent = getIntent();
    String title = intent.getStringExtra(TITLE);
    if (title != null) setTitle(title);
    ArrayList<String> consoleText = intent.getStringArrayListExtra(CONSOLE_TEXT);
    if (theText == null) theText = "";

    lockReleased = false;

    theTextView = (EditText) findViewById(R.id.the_text); // The text display area

    int count = consoleText.size();
    for (int i = 0; i < count; ++i) {
      theText = theText + consoleText.get(i) + '\n';
    }

    theText = theText + Run.TextInputString;
    PromptIndex = theText.length();

    theTextView.setText(theText); // The Editor's display text
    theTextView.setTypeface(Typeface.MONOSPACE);
    theTextView.setSelection(theText.length());

    Basic.TextStyle style = Basic.defaultTextStyle; // Get text color from Settings
    theTextView.setTextColor(style.mTextColor);
    theTextView.setBackgroundColor(style.mBackgroundColor);
    theTextView.setCursorVisible(true);

    theTextView.setTextSize(1, Settings.getFont(this));

    theTextView.addTextChangedListener(inputTextWatcher);

    theTextView.setOnKeyListener(
        new OnKeyListener() {
          public boolean onKey(View v, int keyCode, KeyEvent event) {
            // If the event is a key-down event on the "enter" button
            if ((event.getAction() == KeyEvent.ACTION_DOWN)
                && (keyCode == KeyEvent.KEYCODE_ENTER)) {
              handleEOL();
              return true;
            }
            return false;
          }
        });
  }
Example #28
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    getSupportActionBar().hide();

    mProgressBar = (ProgressBar) findViewById(R.id.progressBarLogin);
    mUsername = (EditText) findViewById(R.id.userLoginText);
    mPassword = (EditText) findViewById(R.id.passLoginText);
    mLoginButton = (Button) findViewById(R.id.login_button);
    TextView sglogintext = (TextView) findViewById(R.id.sgLoginText);

    Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/KGSecondChancesSketch.ttf");
    sglogintext.setTypeface(tf);
    mLoginButton.setTypeface(tf);

    Typeface tfmuseum = Typeface.createFromAsset(getAssets(), "fonts/Museo300-Regular.otf");
    mUsername.setTypeface(tfmuseum);
    mPassword.setTypeface(tfmuseum);

    mLoginButton.setOnClickListener(this);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_add_person_event);
    etNote = (EditText) findViewById(R.id.etAddEventNote);
    etNote.setTypeface(StringUtil.getTypeFaceByRegular(mContext));

    etTimeZone = (EditText) findViewById(R.id.etAddEventTimeZone);
    etTimeZone.setTypeface(StringUtil.getTypeFaceByRegular(mContext));
    initTitleComponent();
    eventControl = new EventController(AddPersonEventActivity.this);
    getIntentToEvent();
    initSubmitButton();
    initCalendaAccount();
    initTimeZoneButton();
    initTitleBar();
    initSelecteTimeButton();
    initRepeatButtons();
    initAlertsButton();
    hideImputOnScrolling();
    initLocationButton();
    setTitleBarLeftButtonToBack();
    //		setTitleBarLeftButtonToBack();
  }
Example #30
0
 // �޸�����������пؼ�������
 public static void changeFonts(ViewGroup root, String path, Activity act) {
   // path������·��
   Typeface tf = Typeface.createFromAsset(act.getAssets(), path);
   for (int i = 0; i < root.getChildCount(); i++) {
     View v = root.getChildAt(i);
     if (v instanceof TextView) {
       ((TextView) v).setTypeface(tf);
     } else if (v instanceof Button) {
       ((Button) v).setTypeface(tf);
     } else if (v instanceof EditText) {
       ((EditText) v).setTypeface(tf);
     } else if (v instanceof ViewGroup) {
       changeFonts((ViewGroup) v, path, act);
     }
   }
 }