Advertisement
Ankhwatcher

Inflate

Apr 3rd, 2012
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. @Override
  2.     public void onCreate(Bundle savedInstanceState) {
  3.         super.onCreate(savedInstanceState);
  4.         /* Supress the default Title Bar because we will be using our own */
  5.         this.requestWindowFeature(Window.FEATURE_NO_TITLE);
  6.         setContentView(R.layout.fixview_fragment);
  7.     }
  8.  
  9.     public void onResume() {
  10.         super.onResume();
  11.     }
  12.  
  13.     public View onCreateView(LayoutInflater inflater, ViewGroup container,
  14.             Bundle savedInstanceState) {
  15.        
  16.  
  17.          captureRouteLayout = (LinearLayout) inflater.inflate(R.layout.captureroute_list, container, false);
  18.  
  19.         captureButton=(Button)captureRouteLayout.findViewById(R.id.capturelButton);
  20.         captureProgress = (ProgressBar) captureRouteLayout.findViewById(R.id.capturelProgress);
  21.  
  22.         SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
  23.         if (settings.getBoolean("capturingRoute", false)) {
  24.             captureButton.setText(R.string.stop);
  25.             captureButton.setOnClickListener(stopCapture);
  26.             captureProgress.setVisibility(0);
  27.         } else {
  28.             captureButton.setOnClickListener(startCapture);
  29.         }
  30.         return captureRouteLayout;
  31.  
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement