Example #1
0
 public void show(View v) {
   koreanWord.setText(words[position].translate);
   knoww.setAlpha(100);
   dontknoww.setAlpha(100);
   knoww.setText(getString(R.string.know));
   dontknoww.setText(getString(R.string.dontknow));
 }
 /**
  * Disables the ability to edit enrollment info Program stages can still be viewed but not
  * changed.
  */
 public void setCompleted() {
   completeButton.setEnabled(false);
   completeButton.setAlpha(0x40);
   terminateButton.setEnabled(false);
   terminateButton.setAlpha(0x40);
   followupButton.setEnabled(false);
   followupButton.setAlpha(0x40);
 }
Example #3
0
  public void endHTTPS() {
    Log.i(LOG_TAG, "Ending HTTPS....");
    Intent itt = new Intent(this, PingService.class);
    itt.setAction(PingService.END_HTTPS);
    startService(itt);

    https_set_btn.setEnabled(true);
    https_set_btn.setAlpha(1.0f);
    https_end_btn.setEnabled(false);
    https_end_btn.setAlpha(0.5f);
    https_start_btn.setEnabled(true);
    https_start_btn.setAlpha(1.0f);
  }
Example #4
0
  public void endICMP() {
    Log.i(LOG_TAG, "Ending ICMP....");
    Intent itt = new Intent(this, PingService.class);
    itt.setAction(PingService.END_ICMP);
    startService(itt);

    icmp_set_btn.setEnabled(true);
    icmp_set_btn.setAlpha(1.0f);
    icmp_end_btn.setEnabled(false);
    icmp_end_btn.setAlpha(0.5f);
    icmp_start_btn.setEnabled(true);
    icmp_start_btn.setAlpha(1.0f);
  }
Example #5
0
  public void startHTTPS() {
    Log.i(LOG_TAG, "Starting HTTPS....");
    Intent itt = new Intent(this, PingService.class);
    itt.putExtra("Ping Settings", (Parcelable) httpsPingSettings);
    itt.setAction(PingService.START_HTTPS);
    startService(itt);

    https_set_btn.setEnabled(false);
    https_set_btn.setAlpha(0.5f);
    https_end_btn.setEnabled(true);
    https_end_btn.setAlpha(1.0f);
    https_start_btn.setEnabled(false);
    https_start_btn.setAlpha(0.5f);
  }
Example #6
0
  public void startICMP() {
    Log.i(LOG_TAG, "Starting ICMP....");
    Intent itt = new Intent(this, PingService.class);
    itt.putExtra("Ping Settings", (Parcelable) icmpPingSettings);
    itt.setAction(PingService.START_ICMP);
    startService(itt);

    icmp_set_btn.setEnabled(false);
    icmp_set_btn.setAlpha(0.5f);
    icmp_end_btn.setEnabled(true);
    icmp_end_btn.setAlpha(1.0f);
    icmp_start_btn.setEnabled(false);
    icmp_start_btn.setAlpha(0.5f);
  }
Example #7
0
 private void de()
 {
     boolean flag;
     if (bru && brv && brw)
     {
         flag = true;
     } else
     {
         flag = false;
     }
     if (!flag)
     {
         brm.setAlpha(0.3F);
     } else
     {
         brm.setAlpha(1.0F);
     }
     brm.setEnabled(flag);
 }
Example #8
0
  private void nextWord() {
    clearFlag();
    int pos1 = position;
    sizeOfFlag = -1;
    int x = 0;
    while ((sizeOfFlag == -1 || sizeOfFlag > 1) && x < 100) {
      sizeOfFlag = words.length;
      if (x == 0) {
        for (int i = 0; i < words.length; ++i) {
          int rand = new Random().nextInt(101);
          if (rand <= words[i].stat) {
            flag[i] = true;
            position = i;
          } else sizeOfFlag--;
        }
        x = 1;
        flag[pos1] = false;
      }
      for (int i = 0; i < words.length; ++i) {
        int rand = new Random().nextInt(101);
        if (rand <= words[i].stat && (flag[i])) {
          position = i;
        } else {
          flag[i] = false;
          sizeOfFlag--;
        }
      }
      x++;
    }

    for (int i = 0; i < words.length; i++) {
      if (flag[i]) position = i;
      else words[i].stat = Math.min(80, words[i].stat + 1);
    }
    questionWord.setText(words[position].word);
    image.setImageResource(
        getResources().getIdentifier(words[position].image, "drawable", getPackageName()));
    koreanWord.setText(getString(R.string.click));
    knoww.setAlpha(0);
    dontknoww.setAlpha(0);
  }
Example #9
0
 @Override
 public View getView(int position, View convertView, ViewGroup parent) {
   Button button;
   if (convertView == null) {
     button = new Button(ctx);
     button.setText("" + (data[position]));
   } else {
     button = (Button) convertView;
   }
   if (position >= levelMax) {
     button.setEnabled(false);
     button.setAlpha(0.5f);
   }
   button.setId(data[position]);
   button.setTextSize(diametr * 0.2f);
   button.setWidth(diametr);
   button.setHeight(diametr);
   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
     button.setBackground(
         ctx.getApplicationContext().getResources().getDrawable(R.drawable.button_sm));
   }
   button.setOnClickListener(
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {
           int lv = v.getId();
           Intent intent = new Intent(ctx, GameActivity.class);
           SharedPreferences spref = ctx.getSharedPreferences("MyPref", Context.MODE_PRIVATE);
           SharedPreferences.Editor ed = spref.edit();
           ed.putInt("Level", lv);
           ed.putBoolean("start", true);
           for (int i = 1; i <= 4; i++) {
             ed.putInt("figure" + i + "position", 0);
             ed.putInt("figure" + i + "rotation", 1);
           }
           ed.commit();
           ctx.startActivity(intent);
         }
       });
   return button;
 }
Example #10
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    view = (ViewGroup) inflater.inflate(R.layout.fragment_footer, container, false);

    btFooterAdd = (Button) view.findViewById(R.id.bt_footer_add);
    btFooterAdd.setOnClickListener(this);
    btFooterEdit = (Button) view.findViewById(R.id.bt_footer_edit);
    btFooterEdit.setOnClickListener(this);
    btFooterDelete = (Button) view.findViewById(R.id.bt_footer_delete);
    btFooterDelete.setOnClickListener(this);

    //        btFooterDelete.setVisibility(View.INVISIBLE);
    btFooterDelete.setAlpha(0.5f);

    viewList.add(btFooterAdd);

    slideUpFragment();

    return view;
  }
Example #11
0
 private void initTopView() {
   Intent intent = getIntent();
   tot_number = intent.getExtras().getInt("number");
   mButton.setEnabled(false);
   mButton.setAlpha(0.3f);
 }
Example #12
0
  @SuppressWarnings("deprecation")
  @SuppressLint("NewApi")
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.mainlayout);
    m_context = MainActivity.this;

    parentView = (RelativeLayout) findViewById(R.id.layoutview);
    windowwidth = getWindowManager().getDefaultDisplay().getWidth();
    screenCenter = windowwidth / 2;
    int[] myImageList =
        new int[] {
          R.drawable.cats, R.drawable.baby1, R.drawable.sachin, R.drawable.cats, R.drawable.puppy
        };

    for (int i = 0; i < 5; i++) {
      LayoutInflater inflate =
          (LayoutInflater) m_context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

      final View m_view = inflate.inflate(R.layout.custom_layout, null);
      ImageView m_image = (ImageView) m_view.findViewById(R.id.sp_image);
      LinearLayout m_topLayout = (LinearLayout) m_view.findViewById(R.id.sp_color);
      LinearLayout m_bottomLayout = (LinearLayout) m_view.findViewById(R.id.sp_linh);
      // final RelativeLayout myRelView = new RelativeLayout(this);
      m_view.setLayoutParams(new LayoutParams((windowwidth - 80), 450));
      m_view.setX(40);
      m_view.setY(40);
      m_view.setTag(i);
      m_image.setBackgroundResource(myImageList[i]);

      /*
                  if (i == 0) {
                      m_view.setRotation(-1);
                  } else if (i == 1) {
                      m_view.setRotation(-5);

                  } else if (i == 2) {
                      m_view.setRotation(3);

                  } else if (i == 3) {
                      m_view.setRotation(7);

                  } else if (i == 4) {
                      m_view.setRotation(-2);

                  } else if (i == 5) {
                      m_view.setRotation(5);

                  }
      */

      // ADD dynamically like button on image.
      final Button imageLike = new Button(m_context);
      imageLike.setLayoutParams(new LayoutParams(100, 50));
      imageLike.setBackgroundDrawable(getResources().getDrawable(R.drawable.like));
      imageLike.setX(20);
      imageLike.setY(-250);
      imageLike.setAlpha(alphaValue);
      m_topLayout.addView(imageLike);

      // ADD dynamically dislike button on image.
      final Button imagePass = new Button(m_context);
      imagePass.setLayoutParams(new LayoutParams(100, 50));
      imagePass.setBackgroundDrawable(getResources().getDrawable(R.drawable.dislike));

      imagePass.setX(260);
      imagePass.setY(-300);
      imagePass.setAlpha(alphaValue);
      m_topLayout.addView(imagePass);

      // Click listener on the bottom layout to open the details of the
      // image.
      m_bottomLayout.setOnClickListener(
          new OnClickListener() {

            @Override
            public void onClick(View v) {
              startActivity(new Intent(m_context, DetailsActivity.class));
            }
          });

      // Touch listener on the image layout to swipe image right or left.
      m_topLayout.setOnTouchListener(
          new OnTouchListener() {

            @Override
            public boolean onTouch(View v, MotionEvent event) {
              x_cord = (int) event.getRawX();
              y_cord = (int) event.getRawY();

              m_view.setX(x_cord - screenCenter + 40);
              m_view.setY(y_cord - 150);
              switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN:
                  x = (int) event.getX();
                  y = (int) event.getY();
                  Log.v("ACTION_DOWN : ", x + " " + y);
                  break;
                case MotionEvent.ACTION_MOVE:
                  x_cord = (int) event.getRawX(); // Updated for more
                  // smoother animation.
                  y_cord = (int) event.getRawY();
                  Log.v("ACTION_MOVE : ", x_cord + " " + y_cord);

                  m_view.setX(x_cord - x);
                  m_view.setY(y_cord - y);
                  // m_view.setY(y_cord-y);
                  // y_cord = (int) event.getRawY();
                  // m_view.setX(x_cord - screenCenter + 40);
                  // m_view.setY(y_cord - 150);
                  if (x_cord >= screenCenter) {
                    m_view.setRotation((float) ((x_cord - screenCenter) * (Math.PI / 32)));
                    if (x_cord > (screenCenter + (screenCenter / 2))) {
                      imageLike.setAlpha(1);
                      if (x_cord > (windowwidth - (screenCenter / 4))) {
                        Likes = 2;
                      } else {
                        Likes = 0;
                      }
                    } else {
                      Likes = 0;
                      imageLike.setAlpha(0);
                    }
                    imagePass.setAlpha(0);
                  } else {
                    // rotate
                    m_view.setRotation((float) ((x_cord - screenCenter) * (Math.PI / 32)));
                    if (x_cord < (screenCenter / 2)) {
                      imagePass.setAlpha(1);
                      if (x_cord < screenCenter / 4) {
                        Likes = 1;
                      } else {
                        Likes = 0;
                      }
                    } else {
                      Likes = 0;
                      imagePass.setAlpha(0);
                    }
                    imageLike.setAlpha(0);
                  }

                  break;
                case MotionEvent.ACTION_UP:
                  x_cord = (int) event.getRawX();
                  y_cord = (int) event.getRawY();

                  Log.e("ACTION_UP X Point", "" + x_cord + " , Y " + y_cord);
                  imagePass.setAlpha(0);
                  imageLike.setAlpha(0);

                  if (Likes == 0) {
                    Log.e("Event Status", "Nothing");
                    m_view.setX(40);
                    m_view.setY(40);
                    m_view.setRotation(0);
                  } else if (Likes == 1) {
                    Log.e("Event Status", "Passed");
                    parentView.removeView(m_view);
                  } else if (Likes == 2) {

                    Log.e("Event Status", "Liked");
                    parentView.removeView(m_view);
                  }
                  break;
                default:
                  break;
              }
              return true;
            }
          });

      parentView.addView(m_view);
    }
  }
 private void disableButton() {
   mBtnSchedule.setEnabled(false);
   mBtnSchedule.setAlpha(.5f);
 }
 private void enableButton() {
   mBtnSchedule.setAlpha(1f);
   mBtnSchedule.setEnabled(true);
 }
  // Method to create a button, giving different functionality dependent on mode
  public void createButton(
      String name,
      final BluetoothDevice device,
      final BluetoothSocket socket,
      String mode,
      Boolean prox) {
    Button b = new Button(this);
    b.setAlpha(0f);
    b.setMinimumWidth(300);
    b.setMinimumHeight(80);
    b.setText(name);
    b.setTextColor(Color.argb(255, 0, 162, 232));

    Button.OnClickListener btnclick = null;

    // If device is an IA
    if (mode.equals("IA")) {
      // Check if device should be activated on proximity
      if (prox) {
        OutputStream outStream;
        try {
          outStream = socket.getOutputStream();
          String message = "1";
          byte[] toSend = message.getBytes();
          outStream.write(toSend);
        } catch (IOException e) {
          e.printStackTrace();
        }
      }

      b.setCompoundDrawablesWithIntrinsicBounds(R.drawable.light_off, 0, 0, 0);
      btnclick =
          new Button.OnClickListener() {
            @Override
            public void onClick(View v) {
              final InputStream inStream;
              final OutputStream outStream;
              try {
                // Request current output level
                outStream = socket.getOutputStream();
                String message = "r";

                byte[] toSend = message.getBytes();
                outStream.write(toSend);
                inStream = socket.getInputStream();

                // Data collection is pending
                gotData = 1;

                // Run timer in thread to prevent stalling
                Thread getInput =
                    new Thread(
                        new Runnable() {
                          @Override
                          public void run() {
                            try {
                              // Give small delay
                              Thread.sleep(100);

                              byte byt[] = new byte[1];

                              // Check if reply from IA
                              if (inStream.available() > 0) {
                                int received = inStream.read(byt, 0, 1);
                                inStream.read();
                                inStream.read();

                                if (received == 1) {
                                  // Toggle output power level
                                  if (((int) byt[0] & 0xff) == '0') {
                                    String message = "1";
                                    byte[] toSend = message.getBytes();
                                    outStream.write(toSend);
                                  } else if (((int) byt[0] & 0xff) == '1') {
                                    String message = "0";
                                    byte[] toSend = message.getBytes();
                                    outStream.write(toSend);
                                  }
                                }
                                // Data received
                                gotData = 2;

                                // Else no reply, IA has lost connection
                              } else {
                                // No data received
                                gotData = 0;
                              }

                            } catch (Exception e) {
                              e.getLocalizedMessage();
                            }
                          }
                        });
                getInput.start();

                // Wait until gotData is 0 or 2
                while (gotData == 1) {}

                // If not data then notify and refresh
                if (gotData == 0) {
                  Toast.makeText(getBaseContext(), R.string.no_data, Toast.LENGTH_LONG).show();
                  refresh();
                }

              } catch (IOException e) {
                e.printStackTrace();
              }
            }
          };

      // Or if device is TA
    } else if (mode.equals("TA")) {
      b.setCompoundDrawablesWithIntrinsicBounds(R.drawable.tv_icon, 0, 0, 0);
      btnclick =
          new Button.OnClickListener() {
            @Override
            public void onClick(View v) {
              television(device.getAddress());
            }
          };
    }

    b.setOnClickListener(btnclick);

    final Button settingsButton = new Button(this);

    settingsButton.setHeight(60);
    settingsButton.setWidth(60);
    settingsButton.setBackgroundResource(R.drawable.settings);
    settingsButton.setTextColor(Color.argb(255, 0, 162, 232));
    // Set associated variables
    settingsButton.setTag(R.string.zero, device.getAddress());
    settingsButton.setTag(R.string.one, b);

    Button.OnClickListener popup = null;

    // TA settings
    if (mode.equals("TA")) {

      popup =
          new Button.OnClickListener() {

            @Override
            public void onClick(final View v) {
              PopupMenu popup = new PopupMenu(getApplicationContext(), settingsButton);

              // Use layout for TA settings
              popup.getMenuInflater().inflate(R.menu.device_options, popup.getMenu());

              popup.setOnMenuItemClickListener(
                  new PopupMenu.OnMenuItemClickListener() {
                    public boolean onMenuItemClick(MenuItem item) {

                      // If rename button was pressed
                      if (item.getTitle().equals("Rename")) {
                        rename(v.getTag(R.string.zero), v.getTag(R.string.one));
                      }
                      return true;
                    }
                  });

              popup.show();
            }
          };

      // IA settings
    } else if (mode.equals("IA")) {

      popup =
          new Button.OnClickListener() {

            @Override
            public void onClick(final View v) {
              PopupMenu popup = new PopupMenu(getApplicationContext(), settingsButton);
              popup.getMenuInflater().inflate(R.menu.ia_device_options, popup.getMenu());

              popup.setOnMenuItemClickListener(
                  new PopupMenu.OnMenuItemClickListener() {
                    public boolean onMenuItemClick(MenuItem item) {
                      if (item.getTitle().equals("Rename")) {
                        rename(v.getTag(R.string.zero), v.getTag(R.string.one));
                      }

                      SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
                      SharedPreferences.Editor editor = settings.edit();

                      if (item.getTitle().equals("Activate on proximity")) {
                        editor.putBoolean(device.getAddress() + "prox", true);
                        editor.commit();
                      }
                      if (item.getTitle().equals("Do not activate on proximity")) {
                        editor.putBoolean(device.getAddress() + "prox", false);
                        editor.commit();
                      }

                      return true;
                    }
                  });

              popup.show();
            }
          };
    }
    settingsButton.setOnClickListener(popup);

    // Add button to list and animate
    ViewGroup layout = (ViewGroup) findViewById(R.id.home_page);
    RelativeLayout LL = new RelativeLayout(this);
    LL.setMinimumHeight(90);

    settingsButton.setX(310);
    settingsButton.setY(10);

    Button cover = new Button(this);
    cover.setBackgroundResource(R.drawable.scroll_cover);
    cover.setX(10);
    cover.setHeight(80);

    Button block = new Button(this);
    block.setBackgroundColor(Color.BLACK);
    block.setX(10);
    block.setHeight(80);

    b.setAlpha(1f);
    appear(b);

    appearAndSlide(cover);
    appearAndHide(block);
    deleteObject(cover, 2000);
    deleteObject(block, 1000);

    delayedAppear(settingsButton);

    LL.addView(b);
    LL.addView(settingsButton);
    LL.addView(block);
    LL.addView(cover);
    layout.addView(LL);
  }
Example #16
0
 private void fadeInButtons(Button button) {
   button.setAlpha(0f);
   button.setVisibility(View.VISIBLE);
   button.animate().alpha(1f).setDuration(0).setListener(null);
 }
Example #17
0
  private void makeNumPad(Context context) {
    textView = new TextView(context);
    textView.setBackgroundColor(0x00000000);
    TableLayout tableLayout = new TableLayout(context);

    tableLayout.setId(41);
    int numRows = 5;
    int numCols = 3;

    htKeys = new Hashtable<Button, String>();
    int[] bgRscs =
        new int[] {
          R.drawable.key1,
          R.drawable.key2,
          R.drawable.key3,
          R.drawable.key4,
          R.drawable.key5,
          R.drawable.key6,
          R.drawable.key7,
          R.drawable.key8,
          R.drawable.key9,
          R.drawable.key_star,
          R.drawable.key0,
          R.drawable.key_sharp,
          R.drawable.key_speed_dial,
          R.drawable.key_call,
          R.drawable.key_delete
        };

    String[] keyChars = new String[] {"1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "#"};

    int cntKey = 0;
    int w = APPWIDTH / numCols;
    int h = w * 2 / 3;
    for (int i = 0; i < numRows; i++) {
      TableRow tr = new TableRow(context);
      for (int j = 0; j < numCols; j++) {
        TableRow.LayoutParams params = new TableRow.LayoutParams(j);
        Button btn = new Button(context);
        btn.setBackgroundResource(bgRscs[cntKey]);
        btn.setLayoutParams(params);
        btn.setAlpha(0.60f);

        if (i < numRows - 1) {
          if (i == 0 && j == 0) {
            btnVoiceMail = btn;
            btn.setOnLongClickListener(
                new View.OnLongClickListener() {

                  @Override
                  public boolean onLongClick(View arg0) {
                    if (isCalling) {
                      return false;
                    }

                    posture = xacPostureSenseFeatureMaker.calculatePosture();
                    if (posture != xacPostureSenseFeatureMaker.NONE) {
                      return false;
                    }

                    //								Log.d(LOGTAG, "voice mail!");
                    LauncherManager.vibrate(500);
                    CallManager.playNextVoiceMail();
                    wasLongClick = true;
                    return false;
                  }
                });
          }

          htKeys.put(btn, keyChars[cntKey]);
          btn.setOnClickListener(
              new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                  if (isCalling) {
                    return;
                  }

                  posture = xacPostureSenseFeatureMaker.calculatePosture();
                  if (posture != xacPostureSenseFeatureMaker.NONE) {
                    return;
                  }

                  Button btn = (Button) view;
                  if (btn == btnVoiceMail && wasLongClick) {
                    wasLongClick = false;
                    return;
                  }
                  strKeys += htKeys.get(btn);
                  textView.setText(
                      new StringBuffer(
                              new StringBuffer(strKeys)
                                  .reverse()
                                  .toString()
                                  .substring(0, Math.min(strKeys.length(), 10)))
                          .reverse()
                          .toString());
                }
              });
        } else {
          if (i == 4 && j == 1) {
            // phone call

            btn.setOnClickListener(
                new View.OnClickListener() {

                  @Override
                  public void onClick(View arg0) {
                    if (isCalling) {
                      return;
                    }
                    //								layoutCallScreen.setBackgroundResource(R.drawable.call_out);
                    RelativeLayout.LayoutParams paramsCallScreen =
                        new RelativeLayout.LayoutParams(
                            RelativeLayout.LayoutParams.MATCH_PARENT,
                            RelativeLayout.LayoutParams.MATCH_PARENT);
                    //								paramsCallScreen.addRule(RelativeLayout.ABOVE, layoutViews.getId());
                    appLayout.addView(layoutCallScreen, paramsCallScreen);
                    isCalling = true;
                  }
                });

          } else if (i == 4 && j == 2) {
            // delete

            btn.setOnClickListener(
                new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                    if (isCalling) {
                      return;
                    }

                    posture = xacPostureSenseFeatureMaker.calculatePosture();
                    if (posture != xacPostureSenseFeatureMaker.NONE) {
                      return;
                    }

                    if (strKeys.length() > 0) {
                      strKeys = strKeys.substring(0, strKeys.length() - 1);
                      textView.setText(
                          new StringBuffer(
                                  new StringBuffer(strKeys)
                                      .reverse()
                                      .toString()
                                      .substring(0, Math.min(strKeys.length(), 10)))
                              .reverse()
                              .toString());
                    }
                  }
                });
          }
        }

        tr.addView(btn, w, h);

        cntKey++;
      }
      tableLayout.addView(
          tr,
          new TableLayout.LayoutParams(
              TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT));
    }

    RelativeLayout.LayoutParams paramsKeys =
        new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    paramsKeys.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
    layoutCall.addView(tableLayout, paramsKeys);

    //		textView.setBackgroundColor(0xFF000000);
    textView.setText("");
    textView.setTextColor(0xFFFFFFFF);
    textView.setTextSize(60);
    textView.setTypeface(LauncherManager.getTypeface(LauncherManager.NORMAL));
    RelativeLayout.LayoutParams paramsText =
        new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.MATCH_PARENT, layoutCall.getMeasuredHeight() - h * numRows);
    paramsText.addRule(RelativeLayout.ABOVE, tableLayout.getId());
    paramsText.bottomMargin = 100;
    layoutCall.addView(textView, paramsText);
  }