Advertisement
kernel_memory_dump

Untitled

Apr 14th, 2014
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.27 KB | None | 0 0
  1. package rajak.igre.kviz;
  2.  
  3. import android.app.Activity;
  4. import android.app.ActionBar;
  5. import android.app.Fragment;
  6. import android.os.Bundle;
  7. import android.view.LayoutInflater;
  8. import android.view.Menu;
  9. import android.view.MenuItem;
  10. import android.view.View;
  11. import android.view.ViewGroup;
  12. import android.widget.RadioButton;
  13. import android.widget.TextView;
  14. import android.os.Build;
  15.  
  16. public class MainActivity extends Activity {
  17.  
  18.     private int trenutnoPitanje;
  19.     private RadioButton rbtnA;
  20.     private RadioButton rbtnB;
  21.     private RadioButton rbtnC;
  22.     private TextView txtPitanje;
  23.     private int score;
  24.    
  25.    
  26.    
  27.     @Override
  28.     protected void onCreate(Bundle savedInstanceState) {
  29.         super.onCreate(savedInstanceState);
  30.         setContentView(R.layout.activity_main);
  31.        
  32.         trenutnoPitanje = 0;
  33.         score = 0;
  34.        
  35.         rbtnA = (RadioButton) findViewById(R.id.rbtnOpcijaA);
  36.         rbtnB = (RadioButton) findViewById(R.id.rbtnOpcijaB);
  37.         rbtnC = (RadioButton) findViewById(R.id.rbtnOpcijaC);
  38.         txtPitanje = (TextView) findViewById(R.id.txtPitanje);
  39.        
  40.      
  41.     }
  42.  
  43.  
  44.     @Override
  45.     public boolean onCreateOptionsMenu(Menu menu) {
  46.        
  47.         // Inflate the menu; this adds items to the action bar if it is present.
  48.         getMenuInflater().inflate(R.menu.main, menu);
  49.         return true;
  50.     }
  51.  
  52.     @Override
  53.     public boolean onOptionsItemSelected(MenuItem item) {
  54.         // Handle action bar item clicks here. The action bar will
  55.         // automatically handle clicks on the Home/Up button, so long
  56.         // as you specify a parent activity in AndroidManifest.xml.
  57.         int id = item.getItemId();
  58.         if (id == R.id.action_settings) {
  59.             return true;
  60.         }
  61.         return super.onOptionsItemSelected(item);
  62.     }
  63.  
  64.     /**
  65.      * A placeholder fragment containing a simple view.
  66.      */
  67.     public static class PlaceholderFragment extends Fragment {
  68.  
  69.         public PlaceholderFragment() {
  70.         }
  71.  
  72.         @Override
  73.         public View onCreateView(LayoutInflater inflater, ViewGroup container,
  74.                 Bundle savedInstanceState) {
  75.             View rootView = inflater.inflate(R.layout.fragment_main, container, false);
  76.             return rootView;
  77.         }
  78.     }
  79.  
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement