/**<pre/>
   * * Beneficiario(beneficiary value)
   * * Numero di telefono         (phone number)
   * * Operatore (provider)
   * * Taglio ricarica (recharge amount)
   *
   * @param mAccountsModel
   * @param beneficiary
   * @param phoneNumber
   * @param provider
   * @param amount
   */
  public void showPhoneTopUp(
      AccountsModel mAccountsModel,
      String beneficiary,
      String phoneNumber,
      String provider,
      double amount,
      int newPayment) {
    setPageTitle(TransferType.PHONE_TOP_UP.getPageTitleId(newPayment));
    setAccountsModel(mAccountsModel);
    content_tl.removeAllViews();
    setText(R.string.beneficiary_tilte, beneficiary);

    if (BaseActivity.isOffline) {
      setText(R.string.phone_number, phoneNumber);
    } else {
      String certifiedNumber = Contants.getUserInfo.getUserprofileHb().getContactPhone();
      if (certifiedNumber != null && phoneNumber.equals(certifiedNumber)) {
        setText(R.string.phone_number, Utils.maskCertifiedNumber(phoneNumber));
      } else {
        setText(R.string.phone_number, phoneNumber);
      }
    }

    setText(R.string.provider_fs, provider);
    setText(
        R.string.recharge_amount,
        Utils.notPlusGenerateFormatMoney(
            contentView.getContext().getResources().getString(R.string.eur), amount));
  }
 /***<pre>
  * Beneficiario Beneficiary name
  *
  * Codice IBAN IBAN code
  *
  * Codice BIC BIC code (optional, show only if present)
  *
  * Codice CUP CUP (optional, show only if present)
  *
  * Codice CIG CIG (optional, show only if present)
  *
  * Importo amount
  *
  * Causale description
  *
  * Data date
  *
  * Causale valutaria Purpose currency (optional, show only if present)
  *
  *
  * @param mAccountsModel
  * @param beneficiary
  * @param iban
  * @param bic
  * @param cup
  * @param cig
  * @param amount
  * @param description
  * @param purposeCurrency
  * @param date
  */
 public void showBankTranser(
     AccountsModel mAccountsModel,
     String beneficiary,
     String iban,
     String bic,
     String cup,
     String cig,
     double amount,
     String description,
     String purposeCurrency,
     long date,
     int newPayment) {
   setPageTitle(TransferType.BANK_TRANSFER.getPageTitleId(newPayment));
   setAccountsModel(mAccountsModel);
   content_tl.removeAllViews();
   setText(R.string.beneficiary_tilte, beneficiary);
   setText(R.string.iban_tilte, iban);
   setText(R.string.bic_tilte, bic);
   setText(R.string.cup_tilte, cup);
   setText(R.string.cig_tilte, cig);
   setText(
       R.string.amount_tilte,
       Utils.notPlusGenerateFormatMoney(
           contentView.getContext().getResources().getString(R.string.eur), amount));
   setText(R.string.description_tilte, description);
   if (!TextUtils.isEmpty(purposeCurrency)) {
     setText(R.string.purpose_currency_tilte, purposeCurrency);
   }
   setText(R.string.date_tilte, TimeUtil.getDateString(date, TimeUtil.dateFormat5));
 }
 private void populateSkillsTable() {
   TableLayout tableSkills = (TableLayout) findViewById(R.id.tableSkills);
   tableSkills.setShrinkAllColumns(false);
   tableSkills.setStretchAllColumns(false);
   tableSkills.removeAllViews();
   skillEditorFactory.resetEditors();
   Map<String, SkillCategoryEditor> categoryEditors = new HashMap<String, SkillCategoryEditor>();
   for (ISkill skill : investigator.getSkills().list()) {
     if (skill.isCategory()) {
       SkillCategoryEditor editor =
           skillEditorFactory.newSkillCategoryEditor(
               this, investigator.getSkills(), (SkillCategory) skill);
       categoryEditors.put(skill.getName(), editor);
       editor.addOnSkillChangedListener(this);
       tableSkills.addView(editor);
     } else {
       Skill sk = (Skill) skill;
       if (sk.isAdded()) continue;
       SkillEditor editor = skillEditorFactory.newSkillEditor(investigator.getSkills(), sk);
       editor.addOnSkillChangedListener(this);
       tableSkills.addView(editor);
     }
   }
   skillChanged(null);
 }
  private void startLiveData() {
    Log.d(TAG, "Starting live data..");

    tl.removeAllViews(); // start fresh
    doBindService();

    currentTrip = triplog.startTrip();
    if (currentTrip == null) showDialog(SAVE_TRIP_NOT_AVAILABLE);

    // start command execution
    new Handler().post(mQueueCommands);

    if (prefs.getBoolean(ConfigActivity.ENABLE_GPS_KEY, false)) gpsStart();
    else gpsStatusTextView.setText(getString(R.string.status_gps_not_used));

    // screen won't turn off until wakeLock.release()
    wakeLock.acquire();

    if (prefs.getBoolean(ConfigActivity.ENABLE_FULL_LOGGING_KEY, false)) {

      // Create the CSV Logger
      long mils = System.currentTimeMillis();
      SimpleDateFormat sdf = new SimpleDateFormat("_dd_MM_yyyy_HH_mm_ss");

      myCSVWriter =
          new LogCSVWriter(
              "Log" + sdf.format(new Date(mils)).toString() + ".csv",
              prefs.getString(
                  ConfigActivity.DIRECTORY_FULL_LOGGING_KEY,
                  getString(R.string.default_dirname_full_logging)));
    }
  }
  public void refreshCallList(Resources resources) {
    if (callsList == null) {
      return;
    }

    callsList.removeAllViews();
    int index = 0;

    if (LinphoneManager.getLc().getCallsNb() == 0) {
      goBackToDialer();
      return;
    }

    isConferenceRunning = LinphoneManager.getLc().getConferenceSize() > 1;
    if (isConferenceRunning) {
      displayConferenceHeader();
      index++;
    }
    for (LinphoneCall call : LinphoneManager.getLc().getCalls()) {
      displayCall(resources, call, index);
      index++;
    }

    if (LinphoneManager.getLc().getCurrentCall() == null) {
      showAudioView();
    }

    callsList.invalidate();
  }
  public void setAllPlayers(List<Player> allPlayers) {
    allPlayersTable.removeAllViews();
    for (final Player player : allPlayers) {
      TableRow playerRow = new TableRow(context);
      playerRow.setLayoutParams(
          new TableRow.LayoutParams(
              TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
      allPlayersTable.addView(playerRow);

      CheckBox playerSelection = new CheckBox(context);
      playerSelection.setChecked(player.isSelected());
      playerSelection.setOnCheckedChangeListener(
          new OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
              isCurrentPlayerSelected = isChecked;
              currentPlayerId = player.getId();
              selectedPlayersChangedListenerManager.notifyListeners();
            }
          });
      playerRow.addView(playerSelection);

      TextView playerName = new TextView(context);
      playerName.setText(player.getName());
      playerName.setTextSize(UIConstants.TEXT_NORMAL_SIZE);
      playerName.setTextColor(UIConstants.TEXT_COLOR);
      playerRow.addView(playerName);
    }
  }
Beispiel #7
0
        @Override
        public void onClick(View arg0) {
          TableRow parentTableRow = (TableRow) arg0.getParent();
          TableLayout parentTableLayout = (TableLayout) parentTableRow.getParent();
          int index = parentTableLayout.indexOfChild(parentTableRow);

          // Getting The String of the removed

          TextView parentTextView = (TextView) parentTableRow.getChildAt(0);
          String parentString = parentTextView.getText().toString();

          parentTableLayout.removeViewAt(index);

          if (parentTableLayout == adSearchMustTableLayout) {
            mustTermsCount--;
            mustTerms.remove(parentString);
            if (mustTermsCount == 0) {
              adSearchMustTableLayout.removeViewAt(0);
              mustTermsPresent = false;
            }
          }
          if (parentTableLayout == adSearchNotTableLayout) {
            notTermsCount--;
            notTerms.remove(parentString);
            if (notTermsCount == 0) {
              adSearchNotTableLayout.removeViewAt(0);
              notTermsPresent = false;
            }
          }
          if (parentTableLayout == adSearchWebsiteTebleLayout) {
            adSearchWebsiteTebleLayout.removeAllViews();
            websitePresent = false;
            websiteToSearch = "";
          }
        }
  @Override
  protected void onResume() {
    super.onResume();
    CustomElementManager.refresh(this);
    ArrayList<CustomElement> elements = CustomElementManager.getElementList();

    // Clear the existing list
    TableLayout tl = (TableLayout) findViewById(R.id.loads_container);
    tl.removeAllViews();

    // Go through and find all the save files and dynamically add them
    int length = elements.size();
    if (length != 0) {
      for (int i = 0; i < length; i++) {
        addEntity(elements.get(i).getName(), elements.get(i).getFilename());
      }
    } else {
      tr = new TableRow(this);
      tr.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
      tr.setGravity(Gravity.CENTER);

      TextView tv = new TextView(this);
      tv.setText(res.getText(R.string.no_elements));

      tr.addView(tv);
      tl.addView(tr);
    }
  }
Beispiel #9
0
  /**
   * -=========================================/ generateOutput() -- Fill R.id.numberBox with bases
   * and squares and cubes. Note that this method simply assumes that start >= end. This should
   * always be the case, as setLimits() does this error checking.
   * /==========================================-
   */
  private void generateOutput(int start, int end) {
    ViewGroup.LayoutParams widthHeightSettings =
        new ViewGroup.LayoutParams(
            ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    // I will later pass this object to TableRows (as they are created) to define their width and
    // height.
    TableLayout numberContainer = (TableLayout) findViewById(R.id.numberBox);
    numberContainer.removeAllViews();
    int row, column;
    Context appContext = getApplicationContext();

    for (row = 0; row <= (end - start); row++) {
      // Create a TableRow row.
      TableRow aRow = new TableRow(appContext);
      aRow.setId(row);
      aRow.setLayoutParams(widthHeightSettings);
      numberContainer.addView(aRow);

      for (column = 0; column < 3; column++) {
        // Create a TextView column, and place it in the just-created TableRow row.
        TextView aNumber = new TextView(appContext);
        // aNumber.setLayoutParams(widthHeightSettings);
        // Fails. I don't know why.
        aNumber.setText(Double.toString(Math.pow(start + row, 1 + column)));
        ((TableRow) numberContainer.findViewById(row)).addView(aNumber);
      }
    }
  }
 /**
  * Starts SIRI JSON bus stop data retrieval from föli's database and clears the previous data from
  * scrollable tablelayout
  */
 public void GetStopData() {
   TableLayout scrollableLayout = (TableLayout) findViewById(R.id.ScrollableTableLayout);
   scrollableLayout.removeAllViews();
   String url = "http://data.foli.fi/siri/sm/" + busNumber;
   // EditText userInput = (EditText) findViewById(R.id.editText);
   // String url = "http://data.foli.fi/siri/sm/"+userInput.getText();
   new ProcessJSON().execute(url);
 }
Beispiel #11
0
 public void stdRadioAction() {
   stdSearchRadioButton.setChecked(true);
   adSearchRadioButton.setChecked(false);
   imgSearchRadioButton.setChecked(false);
   otherSearchesRadioButton.setChecked(false);
   scrollViewTableLayout.removeAllViews();
   resetCount();
   hideSoftKeyboard();
 }
Beispiel #12
0
 private void genView(String[] favs) {
   head.removeAllViews();
   Log.i("testing", "11");
   for (int i = 0; i < favs.length; i++) {
     Log.i("testing", "1");
     genRow(favs[i]);
   }
   gendelAll();
 }
Beispiel #13
0
 public void someMethod(Item item) {
   setTag(item);
   table.removeAllViews();
   scrollView.scrollTo(0, 0);
   header.render(item);
   for (Item child : item.getChildren()) {
     table.addView(getRowView(child));
   }
 }
Beispiel #14
0
        @Override
        public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
          fileTypeChoice = arg2;
          if (arg2 == 23) {
            inflateFileTypeCustomView();

          } else {
            fileTypeCustomTableLayout.removeAllViews();
          }
        }
  public void loadTable() {
    TableLayout table = (TableLayout) findViewById(R.id.table);
    // table.setColumnStretchable(1, true);
    table.removeAllViews();

    final ArrayList<View> rowList = new ArrayList<View>();

    for (int i = 0; i < balance.size(); i++) {
      // final LoaderImageView image = new LoaderImageView(getContext(), getUsersmallimg());
      final LoaderImageView image =
          new LoaderImageView(
              getContext(),
              balance.get(i).getApp().getImageUrl(),
              (int) (ratio * 60),
              (int) (ratio * 60));

      TableRow row =
          createRow(
              image,
              balance.get(i).getApp().getName(),
              balance.get(i).getCreationdate(),
              balance.get(i).getValue(),
              balance.get(i).getReason(),
              getContext());
      row.setId(i);
      rowList.add(row);
      View spacer = createSpacer(getContext(), 1, 1);
      spacer.setId(-100);
      rowList.add(spacer);
      View spacer2 = createSpacer(getContext(), 2, 1);
      spacer2.setId(-100);
      rowList.add(spacer2);
      BeButton b = new BeButton(current.getContext());
      if (i % 2 == 0)
        row.setBackgroundDrawable(
            b.setPressedBackg(
                new BDrawableGradient(0, (int) (ratio * 70), BDrawableGradient.LIGHT_GRAY_GRADIENT),
                new BDrawableGradient(0, (int) (ratio * 70), BDrawableGradient.HIGH_GRAY_GRADIENT),
                new BDrawableGradient(
                    0, (int) (ratio * 70), BDrawableGradient.HIGH_GRAY_GRADIENT)));
      else
        row.setBackgroundDrawable(
            b.setPressedBackg(
                new BDrawableGradient(0, (int) (ratio * 70), BDrawableGradient.GRAY_GRADIENT),
                new BDrawableGradient(0, (int) (ratio * 70), BDrawableGradient.HIGH_GRAY_GRADIENT),
                new BDrawableGradient(
                    0, (int) (ratio * 70), BDrawableGradient.HIGH_GRAY_GRADIENT)));
    }

    for (View row : rowList) {
      table.addView(row);
    }
  }
 public void setRecentTransferModels(
     List<TransferObjectCard> recentTransferModel,
     OnSlideItemClickListener mOnSlideItemClickListener) {
   mItemSlideTouchListener.setOnSlideItemClickListener(mOnSlideItemClickListener);
   this.recentTransferModel = recentTransferModel;
   recent_content.removeAllViews();
   {
     View rowItem = (View) mLayoutInflater.inflate(R.layout.bper_recent_slidelist_items, null);
     TextView textView1 = (TextView) rowItem.findViewById(R.id.textView1);
     textView1.setText(R.string.data);
     TextView textView2 = (TextView) rowItem.findViewById(R.id.textView2);
     textView2.setText(R.string.beneficiary_tilte);
     TextView textView4 = (TextView) rowItem.findViewById(R.id.textView4);
     textView4.setText(R.string.amount_h);
     ImageView imageView = (ImageView) rowItem.findViewById(R.id.imageView1);
     imageView.setVisibility(View.INVISIBLE);
     recent_content.addView(rowItem);
     ImageView divider = new ImageView(context);
     divider.setImageResource(R.drawable.upper_shading);
     recent_content.addView(divider);
   }
   if (recentTransferModel == null || recentTransferModel.size() <= 0) {
     return;
   }
   String currency = contentView.getContext().getResources().getString(R.string.eur);
   int size = recentTransferModel.size();
   for (int i = 0; i < size; i++) {
     TransferObjectCard accountsModel = recentTransferModel.get(i);
     View rowItem = (View) mLayoutInflater.inflate(R.layout.bper_recent_slidelist_items, null);
     TextView textView1 = (TextView) rowItem.findViewById(R.id.textView1);
     String operationDate = TimeUtil.getDateString(accountsModel.getDate(), TimeUtil.dateFormat5);
     textView1.setText(operationDate);
     TextView textView2 = (TextView) rowItem.findViewById(R.id.textView2);
     String beneficiary = accountsModel.getBeneficiaryName();
     if (beneficiary == null) {
       beneficiary = "";
     }
     textView2.setText(beneficiary);
     TextView textView4 = (TextView) rowItem.findViewById(R.id.textView4);
     textView4.setText(Utils.notPlusGenerateFormatMoney(currency, accountsModel.getAmount()));
     recent_content.addView(rowItem);
     if (i < size - 1) {
       recent_content.addView(mLayoutInflater.inflate(R.layout.separation_line_divider, null));
     }
     ViewHolder mViewHolder = new ViewHolder();
     mViewHolder.init(rowItem);
     mViewHolder.position = i;
     rowItem.setTag(mViewHolder);
     rowItem.setOnTouchListener(mItemSlideTouchListener);
   }
 }
 @Override
 public void handleMessage(Message msg) {
   if (msg.what == 0) loadTable();
   else if (msg.what == 1) {
     TableLayout table = (TableLayout) findViewById(R.id.table);
     table.removeAllViews();
     TextView t = new TextView(current.getContext());
     t.setText(current.getContext().getString(R.string.balanceempty));
     t.setTextColor(Color.GRAY);
     t.setPadding(15, 25, 0, 0);
     table.addView(t);
   }
   super.handleMessage(msg);
 }
 /**
  * @param mAccountsModel
  * @param mTransferObject
  */
 public void show(AccountsModel mAccountsModel, TransferObject mTransferObject, int newPayment) {
   content_tl.removeAllViews();
   if (mTransferObject == null) {
     return;
   }
   setAccountsModel(mAccountsModel);
   if (mTransferObject instanceof TransferObjectTransfer) {
     TransferObjectTransfer mRecentTransferModel = (TransferObjectTransfer) mTransferObject;
     showBankTranser(
         mAccountsModel,
         mRecentTransferModel.getBeneficiaryName(),
         mRecentTransferModel.getBeneficiaryIban(),
         mRecentTransferModel.getBeneficiaryBic(),
         mRecentTransferModel.getBeneficiaryCUP(),
         mRecentTransferModel.getBeneficiaryCIG(),
         mRecentTransferModel.getAmount(),
         mRecentTransferModel.getDescription(),
         mRecentTransferModel.getPurposeCurrency(),
         mRecentTransferModel.getDate(),
         newPayment);
   } else if (mTransferObject instanceof TransferObjectEntry) {
     TransferObjectEntry mRecentTransferModel = (TransferObjectEntry) mTransferObject;
     showTranserEntry(
         mAccountsModel,
         mRecentTransferModel.getBeneficiaryName(),
         mRecentTransferModel.getBeneficiaryIban(),
         mRecentTransferModel.getAmount(),
         mRecentTransferModel.getDescription(),
         mRecentTransferModel.getDate(),
         newPayment);
   } else if (mTransferObject instanceof TransferObjectSim) {
     TransferObjectSim mRecentTransferModel = (TransferObjectSim) mTransferObject;
     showPhoneTopUp(
         mAccountsModel,
         mRecentTransferModel.getBeneficiaryName(),
         mRecentTransferModel.getBeneficiaryNumber(),
         mRecentTransferModel.getBeneficiaryProviderName(),
         mRecentTransferModel.getAmount(),
         newPayment);
   } else if (mTransferObject instanceof TransferObjectCard) {
     TransferObjectCard mRecentTransferModel = (TransferObjectCard) mTransferObject;
     showCardTopUp(
         mAccountsModel,
         mRecentTransferModel.getBeneficiaryName(),
         mRecentTransferModel.getBeneficiaryCardNumber(),
         mRecentTransferModel.getAmount(),
         mRecentTransferModel.getDescription(),
         newPayment);
   }
 }
Beispiel #19
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v;
    v = inflater.inflate(R.layout.summer_tires, container, false);

    ArrayList<Tire> summerTires = MainActivity.store.getSummerTires();

    tableLayout = (TableLayout) v.findViewById(R.id.tab_layout);
    tableLayout.removeAllViews();

    if (summerTires != null) {
      ShowTires.showTires(getActivity(), tableLayout, summerTires);
    }
    return v;
  }
  @Override
  public void VisualizeProblem(
      TableLayout visualGrid, final Button[] uiViewsToDisableDuringVisualization) {
    enableViews(uiViewsToDisableDuringVisualization, false);
    operand2Views.clear();
    visualGrid.removeAllViews();
    int rowsNeededToVisualize = occupiesVisualRows(operand1) + occupiesVisualRows(operand2);
    if (rowsNeededToVisualize > 10) {
      Toast.makeText(visualGrid.getContext(), "Not enough room to visualize.", Toast.LENGTH_SHORT)
          .show();
    } else {
      int counter = 0;
      TableRow tr = null;
      while (counter < operand1) {

        if (counter % 10 == 0) {
          // Create a new row to be added.
          tr = new TableRow(visualGrid.getContext());
          tr.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
          // Add the row to table
          visualGrid.addView(
              tr,
              new TableLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
        }
        // Create the columns in the row
        ImageView imageView = new ImageView(visualGrid.getContext());
        imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        imageView.setImageResource(R.drawable.apple);

        if (counter >= correctAnswer) {
          // Save in arrayList so we can remove later
          operand2Views.add(imageView);
        }
        tr.addView(imageView);
        counter++;
      }

      // Fade out all the image views that are representing operand2
      for (View view : operand2Views) {
        Animation myFadeOutAnimation =
            AnimationUtils.loadAnimation(view.getContext(), R.anim.fadeout);
        myFadeOutAnimation.setFillAfter(true);
        view.startAnimation(myFadeOutAnimation); // Set animation to your ImageView
      }
      enableViews(uiViewsToDisableDuringVisualization, true);
    }
  }
Beispiel #21
0
  public void otherRadioAction() {

    stdSearchRadioButton.setChecked(false);
    adSearchRadioButton.setChecked(false);
    imgSearchRadioButton.setChecked(false);
    otherSearchesRadioButton.setChecked(true);

    scrollViewTableLayout.removeAllViews();

    LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View otherSearchesView = inflater.inflate(R.layout.other_searches_layout, null);

    definitionSearchRadioButton =
        (RadioButton) otherSearchesView.findViewById(R.id.othSearchDefinitionRadioButton);
    definitionSearchRadioButton.setOnClickListener(definitionListener);
    relatedWebRadioButton =
        (RadioButton) otherSearchesView.findViewById(R.id.othSrchRelatedWebsitesRadioButton);
    relatedWebRadioButton.setOnClickListener(relatedListener);
    linkToRadioButton =
        (RadioButton) otherSearchesView.findViewById(R.id.othSrchWebsitesLinkToRadioButton);
    linkToRadioButton.setOnClickListener(linkedToListener);
    titleRadioButton = (RadioButton) otherSearchesView.findViewById(R.id.othSrchTitleRadioButton);
    titleRadioButton.setOnClickListener(titleListener);
    urlRadioButton = (RadioButton) otherSearchesView.findViewById(R.id.othSrchUrlRadioButton);
    urlRadioButton.setOnClickListener(urlListener);
    anchorRadioButton = (RadioButton) otherSearchesView.findViewById(R.id.othSrchAnchorRadioButton);
    anchorRadioButton.setOnClickListener(anchorListener);

    definitionTableRow =
        (TableRow) otherSearchesView.findViewById(R.id.othSearchDefinitionInflater);
    relatedTableRow = (TableRow) otherSearchesView.findViewById(R.id.othSearchRelatedToinflater);
    linkToTableRow = (TableRow) otherSearchesView.findViewById(R.id.othSearchlinkToInflater);
    titleTableRow = (TableRow) otherSearchesView.findViewById(R.id.othSearchTitleInflater);
    urlTableRow = (TableRow) otherSearchesView.findViewById(R.id.othSearchUrlInflater);
    anchorTableRow = (TableRow) otherSearchesView.findViewById(R.id.othSearchAnchorInflater);

    scrollViewTableLayout.addView(otherSearchesView);
    definitionSearchRadioButton.setChecked(true);

    otherSearchEditTextInflater(definitionTableRow);

    resetCount();
    hideSoftKeyboard();
  }
  public void setWordList() {
    Cursor cursor = dataAdapter1.getWord_Tone(syllable);
    Integer sum = cursor.getCount();
    wordRecordArrayList.clear();
    tl_word.removeAllViews();

    //        TableRow row = new TableRow(getActivity().getApplicationContext());
    //        TableRow.LayoutParams lp = new
    // TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT);
    //        TextView tone3= new TextView(getActivity().getApplicationContext());
    //        tone3.setText("  ");
    //        tone3.setTextSize(40);
    //        tone3.setPadding(20, 0, 30, 0);
    //        tone3.setTextColor(Color.BLACK);
    //
    //        TextView tone2 = new TextView(getActivity().getApplicationContext());
    //        tone2.setText("  ");
    //        tone2.setTextSize(40);
    //        tone2.setPadding(100, 0, 30, 0);
    //        tone2.setTextColor(Color.BLACK);
    //
    //        row.addView(tone3);
    //        row.addView(tone2);
    //        tl_word.addView(row);
    if (sum != 0) {
      cursor.moveToFirst();
      for (int i = 0; i < sum; i++) {
        Integer c_id = cursor.getInt(0);
        String chin_word = cursor.getString(1);
        Integer tone = cursor.getInt(2);
        Integer s_id = cursor.getInt(3);
        Integer is_available = cursor.getInt(4);
        Integer frequency = cursor.getInt(5);
        wordRecord newRecord = new wordRecord(c_id, chin_word, tone, s_id, is_available, frequency);
        wordRecordArrayList.add(newRecord);
        Log.d("", "chin word " + chin_word + " is_available: " + "" + is_available);

        setTable(i);
        cursor.moveToNext();
      }
    }
  }
 /**<pre/>
  * * Beneficiario(beneficiary value)
  * * Carta numero (card number)
  * * Importo (amount)
  * * Causale (description only if is present)
  *
  * @param mAccountsModel
  * @param beneficiary
  * @param cardNumber
  * @param amount
  * @param description
  * @param fees
  */
 public void showCardTopUp(
     AccountsModel mAccountsModel,
     String beneficiary,
     String cardNumber,
     double amount,
     String description,
     int newPayment) {
   setPageTitle(TransferType.CARD_TOP_UP.getPageTitleId(newPayment));
   setAccountsModel(mAccountsModel);
   content_tl.removeAllViews();
   setText(R.string.beneficiary_tilte, beneficiary);
   setText(R.string.fs_card_number, cardNumber);
   setText(
       R.string.amount_tilte,
       Utils.notPlusGenerateFormatMoney(
           contentView.getContext().getResources().getString(R.string.eur), amount));
   if (!TextUtils.isEmpty(description)) {
     setText(R.string.description_tilte, description);
   }
 }
 private void updateSavedTucList() {
   // System.out.println("updateSavedTucList");
   ArrayList<HashMap<String, String>> tucList = dbTools.getAllTucs();
   tucTableScrollView.removeAllViews();
   // Display saved tuc list
   int i = 0;
   for (HashMap<String, String> s : tucList) {
     int lineId = insertTucInScrollView(s, i++);
     View newTucRow = tucTableScrollView.getChildAt(lineId);
     TextView currSaldo = (TextView) newTucRow.findViewById(R.id.tucSaldoTextView);
     if (currSaldo.getText() == null
         || currSaldo.getText().length() == 1
         || currSaldo
             .getText()
             .toString()
             .equals(getApplicationContext().getString(R.string.pending))) {
       // System.out.println("Updating saldo for line "+lineId);
       new UpdateSaldo(lineId).execute();
     }
   }
 }
  public void updateGrid() {
    myIntervention.removeAllViews();
    View child = inflater.inflate(R.layout.custom_operation_data_table, null);
    myIntervention.addView(child);

    for (int i = 0; i < interventionListForGrid.size(); i++) {
      child = inflater.inflate(R.layout.custom_operation_data_table, null);
      TextView name = (TextView) child.findViewById(R.id.operationTitle);
      TextView cost = (TextView) child.findViewById(R.id.costOperation);
      TextView date = (TextView) child.findViewById(R.id.dateOperation);
      name.setText(interventionListForGrid.get(i).getDescription());
      cost.setText(String.format("%1$,.2f €", interventionListForGrid.get(i).getPrice()));
      date.setText(GlobalContext.getFormattedSmallDate(interventionListForGrid.get(i).getDate()));
      if (i == interventionListForGrid.size() - 1) {
        View divider = (View) child.findViewById(R.id.divider);
        divider.setVisibility(View.GONE);
      }

      myIntervention.addView(child);
    }
  }
  private void updateTable() {
    tbLayout.removeAllViews();
    for (SensorMeasure measure : this.mainListSensorMeasures) {
      if ((calendarFilter != null)
          && (measure.getTimestamp().getTimeInMillis() < calendarFilter.getTimeInMillis()))
        continue; // Si la medida es anterior al filtro, nos la saltamos
      TableRow row = new TableRow(this);
      TextView tvDate = new TextView(this);
      TableRow.LayoutParams params = new TableRow.LayoutParams();
      params.column = 1;
      params.gravity = Gravity.LEFT;
      tvDate.setLayoutParams(params);

      tvDate.setText(DateFormat.getDateTimeInstance().format(measure.getTimestamp().getTime()));
      TextView tvValue = new TextView(this);
      tvValue.setGravity(Gravity.RIGHT + Gravity.FILL_HORIZONTAL);
      tvValue.setText(measure.getValue());
      row.addView(tvDate);
      row.addView(tvValue);
      tbLayout.addView(row);
    }
  }
 /**<pre/>
  * Beneficiario Beneficiary name
  *
  * Codice IBAN IBAN code
  *
  * Importo amount
  *
  * Causale description
  *
  * Data date
  *
  *
  * @param mAccountsModel
  * @param beneficiary
  * @param iban
  * @param amount
  * @param description
  * @param date
  */
 public void showTranserEntry(
     AccountsModel mAccountsModel,
     String beneficiary,
     String iban,
     double amount,
     String description,
     long date,
     int newPayment) {
   setPageTitle(TransferType.TRANSFER_ENTRY.getPageTitleId(newPayment));
   setAccountsModel(mAccountsModel);
   content_tl.removeAllViews();
   setText(R.string.beneficiary_tilte, beneficiary);
   setText(R.string.iban_tilte, iban);
   setText(
       R.string.amount_tilte,
       Utils.notPlusGenerateFormatMoney(
           contentView.getContext().getResources().getString(R.string.eur), amount));
   if (!TextUtils.isEmpty(description)) {
     setText(R.string.description_tilte, description);
   }
   setText(R.string.date_tilte, TimeUtil.getDateString(date, TimeUtil.dateFormat5));
 }
Beispiel #28
0
 public void load_tables() {
   tableLayout.removeAllViews();
   for (ArrayList<String> row : ((Tabs) this.getActivity()).getTabla().getArray()) {
     TableRow.LayoutParams layoutCelda;
     TableRow.LayoutParams layoutFila =
         new TableRow.LayoutParams(
             TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);
     TableRow fila = new TableRow(getActivity());
     fila.setLayoutParams(layoutFila);
     for (String item : row) {
       TextView text = new TextView(getActivity());
       text.setText(item);
       text.setGravity(Gravity.HORIZONTAL_GRAVITY_MASK);
       text.setBackgroundResource(R.drawable.tabla_celda);
       layoutCelda =
           new TableRow.LayoutParams(getTextWidth(item), TableRow.LayoutParams.WRAP_CONTENT);
       text.setLayoutParams(layoutCelda);
       fila.addView(text);
     }
     tableLayout.addView(fila);
   }
 }
  private void buildDResultTable() {
    tableLayoutD.removeAllViews();
    for (int i = 0; i < eigenDecomp.getD().getColumnDimension(); i++) {
      TableRow row = new TableRow(this);
      row.setLayoutParams(
          new TableRow.LayoutParams(
              TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));

      for (int j = 0; j < eigenDecomp.getD().getRowDimension(); j++) {
        TextView et = new TextView(this);
        et.setText(Double.toString(eigenDecomp.getD().getEntry(i, j)));
        et.setGravity(Gravity.CENTER);

        et.setLayoutParams(
            new TableRow.LayoutParams(
                TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT));

        et.setPadding(2, 2, 2, 2);
        row.addView(et);
      }
      tableLayoutD.addView(row);
    }
  }
Beispiel #30
0
        @Override
        public void onClick(View arg0) {
          hideSoftKeyboard();

          if (adSearchWebsiteEditText.getText().length() > 0) {

            // set the web site string
            websiteToSearch = adSearchWebsiteEditText.getText().toString();

            // Setting the websitepresent boolean true;
            websitePresent = true;

            // The layout work
            adSearchWebsiteTebleLayout.removeAllViews();
            LayoutInflater inflater =
                (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            // Adding The Title
            View webSiteViewTitle = inflater.inflate(layout.title_layout, null);
            TextView TitleTextView =
                (TextView) webSiteViewTitle.findViewById(R.id.newTitleTextView);
            TitleTextView.setText(R.string.website_title);
            adSearchWebsiteTebleLayout.addView(webSiteViewTitle);

            // Adding The web site
            View websiteView = inflater.inflate(R.layout.added_terms_layout, null);

            TextView newWebsiteTextView = (TextView) websiteView.findViewById(R.id.newTermTextView);

            Button newDeleteButton = (Button) websiteView.findViewById(R.id.newRemoveTermButton);
            newDeleteButton.setOnClickListener(deleteButtonListener);

            newWebsiteTextView.setText(adSearchWebsiteEditText.getText().toString());
            adSearchWebsiteTebleLayout.addView(websiteView);
            adSearchWebsiteEditText.setText("");
          }
        }