SHARE
TWEET

Untitled

a guest Aug 13th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class science extends Fragment implements View.OnClickListener
  2. {
  3.    send s;
  4.  
  5. @Override
  6. public void onAttach(Context context)
  7. {
  8.     s=(send)context;
  9.     super.onAttach(context);
  10. }
  11.  
  12. @Override
  13. public View onCreateView(LayoutInflater l, ViewGroup c, Bundle b) {
  14.     View v=l.inflate(R.layout.science,c,false);
  15.     ImageView img1=v.findViewById(R.id.img1);
  16.     ImageView img2=v.findViewById(R.id.img2);
  17.     ImageView img3=v.findViewById(R.id.img3);
  18.     ImageView img4=v.findViewById(R.id.img4);
  19.     img1.setOnClickListener(this);
  20.     img2.setOnClickListener(this);
  21.     img3.setOnClickListener(this);
  22.     img4.setOnClickListener(this);
  23.  
  24.     return v;
  25. }
  26.  
  27. @Override
  28. public void onClick(View v)
  29. {
  30.     s.science(v);
  31.  
  32. }
RAW Paste Data
Top