daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. try {
  2.         //To get weight
  3.         EditText W = (EditText) view.findViewById(R.id.weight);
  4.         //Weight = Float.valueOf(W.getText().toString());
  5.         //String weight = W.getText().toString();
  6.         Weight = Float.valueOf(W.getText().toString());
  7.  
  8.         //To get height
  9.         EditText H = (EditText) view.findViewById(R.id.height);
  10.         Height = Float.valueOf(H.getText().toString());
  11.  
  12.         //To get age
  13.         EditText A = (EditText) view.findViewById(R.id.Age);
  14.         Age = Float.valueOf(A.getText().toString());
  15.     }
  16.     catch(Exception e)
  17.     {
  18.         e.getMessage();
  19.     }
  20.      
  21. <EditText
  22.         android:id="@+id/weight"
  23.         android:layout_width="70dp"
  24.         android:layout_height="wrap_content"
  25.         android:layout_alignBottom="@id/da"
  26.         android:layout_centerHorizontal="true"
  27.         android:ems="10"
  28.         android:inputType="number"
  29.         android:textColor="@color/colorAccent" />
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top