Advertisement
colmulhall

Untitled

Apr 3rd, 2014
1,080
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2. public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
  3. {
  4.     View v = inflater.inflate(R.layout.fragment_layout, container,false);  
  5.        
  6.     ImageView img1 = (ImageView) v.findViewById(R.id.im1);
  7.     TextView tv1 = (TextView ) v.findViewById(R.id.pt1);
  8.     ImageView img2 = (ImageView) v.findViewById(R.id.im2);
  9.     TextView tv2 = (TextView ) v.findViewById(R.id.pt2);
  10.     ImageView img3 = (ImageView) v.findViewById(R.id.im3);
  11.     TextView tv3 = (TextView ) v.findViewById(R.id.pt3);
  12.        
  13.     if(current_page == 1)  // Aras an Uachtaran page
  14.     {
  15.         img1.setImageResource(R.drawable.aras_static_1);
  16.         tv1.setText(R.string.aras_an_uachtarain_desc_p1);
  17.         img2.setImageResource(R.drawable.aras_static_2);
  18.         tv2.setText(R.string.aras_an_uachtarain_desc_p2);
  19.         img3.setImageResource(R.drawable.aras_static_3);
  20.         tv3.setText(R.string.aras_an_uachtarain_desc_p3);
  21.     }
  22.     else if(current_page == 2)   // Papal cross page
  23.     {
  24.         img1.setImageResource(R.drawable.papal_static_1);
  25.         tv1.setText(R.string.papal_cross_desc_p1);
  26.         img2.setImageResource(R.drawable.papal_static_2);
  27.         tv2.setText(R.string.papal_cross_desc_p2);
  28.     }
  29. }
Advertisement
RAW Paste Data Copied
Advertisement