Revision 51938302

b/.classpath
3 3
	<classpathentry kind="src" path="gen"/>
4 4
	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
5 5
	<classpathentry kind="src" path="src"/>
6
	<classpathentry kind="lib" path="lib/droid-fu-1.0-SNAPSHOT.jar"/>
6 7
	<classpathentry kind="output" path="bin"/>
7 8
</classpath>
b/AndroidManifest.xml
2 2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 3
	package="com.rackspacecloud.android" android:versionCode="1"
4 4
	android:versionName="1.0">
5
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
5 6
	<application android:icon="@drawable/rackspace60"
6 7
		android:label="@string/app_name">
7 8
		<activity android:name=".RackspaceCloudActivity"
b/res/layout/viewobject.xml
93 93
    android:textColor="#fff"
94 94
    android:layout_marginBottom="15dip"
95 95
    />
96
 <!-- Preview Button --> 
97
    <Button xmlns:android="http://schemas.android.com/apk/res/android"
98
    android:id="@+id/preview_button"
99
    android:text="Preview File"
100
    android:layout_width="100dip"
101
    android:layout_height="wrap_content"
102
    android:layout_gravity="left"
103
    android:layout_marginLeft="20dip"
104
    android:layout_marginTop="10dip"
105
    />
96
 <!-- Preview Button -->
97
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/linearLayout1">
98
    <Button android:layout_gravity="left" android:id="@+id/download_button" android:layout_height="wrap_content" android:layout_marginTop="10dip" android:layout_marginLeft="20dip" android:text="Download" android:layout_width="130dip"></Button>
99
    <Button android:layout_gravity="left" android:id="@+id/preview_button" android:layout_height="wrap_content" android:layout_marginTop="10dip" android:text="Preview File" android:layout_width="130dip" android:layout_marginLeft="10dip"></Button>
100
</LinearLayout>
106 101
	</LinearLayout>
107 102

  
108 103
 </ScrollView>
b/src/com/rackspace/cloud/files/api/client/ContainerObjectManager.java
129 129
		return resp;
130 130
	}
131 131
	
132
	public HttpResponse getObject(String Container, String Object) throws CloudServersException {
133
		HttpResponse resp = null;
134
		CustomHttpClient httpclient = new CustomHttpClient(context);
135
		HttpGet getObject = new HttpGet(Account.getAccount().getStorageUrl() + "/" + Container + "/" + Object);
136
				
137
		getObject.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
138
		httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class);
139

  
140
		try {			
141
			resp = httpclient.execute(getObject);
142
		} catch (ClientProtocolException e) {
143
			CloudServersException cse = new CloudServersException();
144
			cse.setMessage(e.getLocalizedMessage());
145
			throw cse;
146
		} catch (IOException e) {
147
			CloudServersException cse = new CloudServersException();
148
			cse.setMessage(e.getLocalizedMessage());
149
			throw cse;
150
		} catch (FactoryConfigurationError e) {
151
			CloudServersException cse = new CloudServersException();
152
			cse.setMessage(e.getLocalizedMessage());
153
			throw cse;
154
		}	
155
		return resp;
156
	}
157
	
132 158
	public HttpResponse addObject(String Container, String Path, String Object, String type) throws CloudServersException {
133 159
		HttpResponse resp = null;
134 160
		CustomHttpClient httpclient = new CustomHttpClient(context);
b/src/com/rackspacecloud/android/ContainerObjectDetails.java
1 1
package com.rackspacecloud.android;
2 2

  
3
import java.io.BufferedOutputStream;
4
import java.io.File;
5
import java.io.FileNotFoundException;
6
import java.io.FileOutputStream;
3 7
import java.io.IOException;
4 8
import java.io.StringReader;
5 9
import java.text.ParseException;
......
11 15
import javax.xml.parsers.SAXParser;
12 16
import javax.xml.parsers.SAXParserFactory;
13 17

  
18
import org.apache.http.HttpEntity;
14 19
import org.apache.http.HttpResponse;
15 20
import org.apache.http.client.ClientProtocolException;
16 21
import org.apache.http.impl.client.BasicResponseHandler;
22
import org.apache.http.util.EntityUtils;
17 23
import org.xml.sax.InputSource;
18 24
import org.xml.sax.SAXException;
19 25
import org.xml.sax.XMLReader;
......
28 34
import android.net.Uri;
29 35
import android.os.AsyncTask;
30 36
import android.os.Bundle;
37
import android.os.Environment;
31 38
import android.util.Log;
32 39
import android.view.Menu;
33 40
import android.view.MenuInflater;
......
51 58
public class ContainerObjectDetails extends Activity {
52 59
	
53 60
	private static final int deleteObject = 0;
61
	private final String DOWNLOAD_DIRECTORY = "/RackspaceCloud";
54 62
	private ContainerObjects objects;
55 63
	private String containerNames;
56 64
	private String cdnURL;
......
61 69
	private double megaBytes;
62 70
	private double kiloBytes;
63 71
	public Button previewButton;
72
	public Button downloadButton;
64 73
	public Context context;
65
	ProgressDialog dialog;
74
	private ProgressDialog dialog;
75
	private Boolean isDownloaded;
66 76
	
67 77
    /** Called when the activity is first created. */
68 78
    @Override
......
86 96
	protected void onSaveInstanceState(Bundle outState) {
87 97
		super.onSaveInstanceState(outState);
88 98
		outState.putSerializable("container", objects);
99
		outState.putBoolean("isDownloaded", isDownloaded);
89 100
	}
90 101

  
91 102
    private void restoreState(Bundle state) {
92 103
    	if (state != null && state.containsKey("container")) {
93 104
    		objects = (ContainerObjects) state.getSerializable("container");
94 105
    	}
95
        loadObjectData();
96
        
97
        if ( cdnEnabled.equals("true"))  {
98
        	this.previewButton = (Button) findViewById(R.id.preview_button);
99
        	previewButton.setOnClickListener(new MyOnClickListener());
100
        } else {
101
        	this.previewButton = (Button) findViewById(R.id.preview_button);
102
        	previewButton.setVisibility(View.GONE);
103
      }
104
        
106
    	loadObjectData();
107

  
108
    	if ( cdnEnabled.equals("true"))  {
109
    		this.previewButton = (Button) findViewById(R.id.preview_button);
110
    		previewButton.setOnClickListener(new MyOnClickListener());
111
    	} else {
112
    		this.previewButton = (Button) findViewById(R.id.preview_button);
113
    		previewButton.setVisibility(View.GONE);
114
    	}
115

  
116
    	if (state != null && state.containsKey("isDownloaded")){
117
    		isDownloaded = state.getBoolean("isDownloaded");
118
    	}
119
    	else{
120
    		isDownloaded = fileIsDownloaded();
121
    	}
122
    	this.downloadButton = (Button) findViewById(R.id.download_button);
123
    	if ( isDownloaded )  {
124
    		downloadButton.setText("Open File");
125
    	} else {
126
    		downloadButton.setText("Download File");
127
    	}   	
128
    	downloadButton.setOnClickListener(new MyOnClickListener());
105 129
    }
106
   
107
    
130

  
108 131

  
109 132
    private void loadObjectData() {
110 133
    	//Object Name
......
155 178
    private class MyOnClickListener implements View.OnClickListener {
156 179
        //@Override********************************************************************remove comment
157 180
        public void onClick(View v) {
158
        	Intent viewIntent = new Intent("android.intent.action.VIEW", Uri.parse(cdnURL + "/" + objects.getCName()));
159
        	startActivity(viewIntent);  
160

  
181
        	if(v.equals(findViewById(R.id.preview_button))){
182
        		Intent viewIntent = new Intent("android.intent.action.VIEW", Uri.parse(cdnURL + "/" + objects.getCName()));
183
        		startActivity(viewIntent);  
184
        	}
185
        	/*
186
        	 * need to perform different functions based on if
187
        	 * the file has in the devices filesystem
188
        	 */
189
        	if(v.equals(findViewById(R.id.download_button))){
190
        		if(!isDownloaded){
191
        			if(storageIsReady()){
192
        				new ContainerObjectDownloadTask().execute();
193
        			}
194
        		}
195
        		else{
196
        			openFile();
197
        		}
198
        	}
161 199
        }
162 200
    }
163 201
    
......
230 268
		this.objects = object;
231 269
	}
232 270
	
271
	/*
272
	 * returns false if external storage is not avaliable
273
	 * (if its mounted, missing, read-only, etc)
274
	 * from: http://developer.android.com/guide/topics/data/data-storage.html#filesExternal
275
	 */
276
	private boolean storageIsReady(){
277
		boolean mExternalStorageAvailable = false;
278
		boolean mExternalStorageWriteable = false;
279
		String state = Environment.getExternalStorageState();
280

  
281
		if (Environment.MEDIA_MOUNTED.equals(state)) {
282
		    // We can read and write the media
283
		    mExternalStorageAvailable = mExternalStorageWriteable = true;
284
		} else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
285
		    // We can only read the media
286
		    mExternalStorageAvailable = true;
287
		    mExternalStorageWriteable = false;
288
		} else {
289
		    // Something else is wrong. It may be one of many other states, but all we need
290
		    //  to know is we can neither read nor write
291
		    mExternalStorageAvailable = mExternalStorageWriteable = false;
292
		}
293
		return mExternalStorageAvailable && mExternalStorageWriteable;
294
	}
295
	
296
	private boolean fileIsDownloaded(){
297
		if(storageIsReady()){
298
			String fileName = Environment.getExternalStorageDirectory().getPath() + "/RackspaceCloud/" + objects.getCName();
299
			File f = new File(fileName);
300
			return f.isFile();
301
		}
302
		return false;
303
	}
304
	
305
	private void openFile(){
306
		File object = new File(Environment.getExternalStorageDirectory().getPath() + "/RackspaceCloud/" + objects.getCName());
307
		Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW);
308
	    File file = new File(object.getAbsolutePath()); 
309
	    String extension = android.webkit.MimeTypeMap.getFileExtensionFromUrl(Uri.fromFile(file).toString());
310
	    String mimetype = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
311
	    myIntent.setDataAndType(Uri.fromFile(file),mimetype);
312
	    startActivity(myIntent);
313
	}
314
	
315
	private boolean writeFile(byte[] data){
316
		String directoryName = Environment.getExternalStorageDirectory().getPath() + DOWNLOAD_DIRECTORY;
317
		File f = new File(directoryName);
318
		
319
		if(!f.isDirectory()){
320
			if(!f.mkdir()){
321
				return false;
322
			}
323
		}
324
		
325
		String filename = directoryName + "/" + objects.getCName();
326
		File object = new File(filename);
327
		BufferedOutputStream bos = null;
328
		
329
		try{
330
			FileOutputStream fos = new FileOutputStream(object);
331
			bos = new BufferedOutputStream(fos);
332
			bos.write(data);
333
		}
334
		catch(FileNotFoundException e){
335
			e.printStackTrace();
336
		}
337
		catch(IOException e){
338
			e.printStackTrace();
339
		}
340
		finally{
341
			if(bos != null){
342
				try {
343
					bos.flush();
344
					bos.close();
345
				} catch (IOException e) {
346
					// TODO Auto-generated catch block
347
					e.printStackTrace();
348
				}
349
			}
350
		}
351
		return true;
352
	}
353
	
233 354
	//Task's
234 355
	    	
235 356
	    	 private CloudServersException parseCloudServersException(HttpResponse response) {
......
304 425
	    				}			
305 426
	    			}
306 427
	    	    }
428
	    	 
429
	    	 private class ContainerObjectDownloadTask extends AsyncTask<Void, Void, HttpResponse> {
430
	    	    	
431
	    			private CloudServersException exception;
432
	    			
433
	    			protected void onPreExecute(){
434
	    				dialog = ProgressDialog.show(ContainerObjectDetails.this, "", "Downloading...", true);
435
	    			}
436

  
437
	    			@Override
438
	    			protected HttpResponse doInBackground(Void... arg0) {
439
	    				HttpResponse resp = null;	
440
	    				try {
441
	    					resp = (new ContainerObjectManager(context)).getObject(containerNames, objects.getCName());
442
	    				} catch (CloudServersException e) {
443
	    					exception = e;
444
	    				}
445
	    				return resp;
446
	    			}
447
	    	    	
448
	    			@Override
449
	    			protected void onPostExecute(HttpResponse response) {
450
	    				dialog.dismiss();
451
	    				if (response != null) {
452
	    					int statusCode = response.getStatusLine().getStatusCode();
453
	    					if (statusCode == 200) {
454
	    						setResult(Activity.RESULT_OK);
455
	    				    	HttpEntity entity = response.getEntity();
456
								
457
								try {
458
									if(writeFile(EntityUtils.toByteArray(entity))){
459
										downloadButton.setText("Open File");
460
										isDownloaded = true;
461
									}
462
									else{
463
										showAlert("Error", "There was a problem downloading your file.");
464
									}
465
									
466
								} catch (IOException e) {
467
									// TODO Auto-generated catch block
468
									e.printStackTrace();
469
								}
470
								
471
	    					} else {
472
	    						CloudServersException cse = parseCloudServersException(response);
473
	    						if ("".equals(cse.getMessage())) {
474
	    							showAlert("Error", "There was a problem downloading your File.");
475
	    						} else {
476
	    							showAlert("Error", "There was a problem downloading your file: " + cse.getMessage());
477
	    						}
478
	    					}
479
	    				} else if (exception != null) {
480
	    					showAlert("Error", "There was a problem downloading your file: " + exception.getMessage());				
481
	    				}			
482
	    			}
483
	    	    }
307 484
	
308 485
  }
b/src/com/rackspacecloud/android/ContainerObjectsActivity.java
67 67
	private Context context;
68 68
	private String currentPath;
69 69
	private ContainerObjects[] curDirFiles;
70
	ProgressDialog dialog;
70
	//private ProgressDialog dialog;
71
	private boolean loadingFiles;
72
	private FileAdapter adapter;
73

  
71 74

  
72 75
	@Override
73 76
	public void onCreate(Bundle savedInstanceState) {
......
89 92
		outState.putSerializable("container", files);
90 93
		outState.putString("path", currentPath);
91 94
		outState.putSerializable("curFiles", curDirFiles);
95
		outState.putBoolean("loadingFiles", loadingFiles);
92 96
	}
97
	
98
	
93 99

  
94 100
	private void restoreState(Bundle state) {
101
		
102
		adapter = (FileAdapter)getLastNonConfigurationInstance();
103
		
95 104
		if(state != null){
96 105
			if(state.containsKey("path")){
97 106
				currentPath = state.getString("path");
......
99 108
			else{
100 109
				currentPath = "";
101 110
			}
102
			if(state.containsKey("container") && state.containsKey("curFiles")){
103
				files = (ContainerObjects[]) state.getSerializable("container");
104
				curDirFiles = (ContainerObjects[]) state.getSerializable("curFiles");
105
				if(curDirFiles.length == 0){
106
					displayNoServersCell();
107
				} else {
108
					getListView().setDividerHeight(1); //restore divider lines
109
					setListAdapter(new FileAdapter());
111
			
112
			if(state.containsKey("loadingFiles") && state.getBoolean("loadingFiles")){
113
				loadFiles();
114
			}
115
			else{
116
				if(state.containsKey("container") && state.containsKey("curFiles")){
117
					files = (ContainerObjects[]) state.getSerializable("container");
118
					curDirFiles = (ContainerObjects[]) state.getSerializable("curFiles");
119
					if(curDirFiles != null){
120
						if(curDirFiles.length == 0){
121
							displayNoServersCell();
122
						} else {
123
							Log.d("info", "captin curDirFiles lenght is: " + curDirFiles.length);
124
							getListView().setDividerHeight(1); //restore divider lines
125
							setListAdapter(new FileAdapter());
126
						}
127
					}
110 128
				}
111 129
			}
112 130
		}
......
115 133
			loadFiles();
116 134
		}	
117 135
	}
136
	
137
	public Object onRetainNonConfigurationInstance(){
138
		return adapter;
139
	}
118 140

  
119 141
	/*
120 142
	 * overriding back button press, because we are not actually changing
......
138 160
		displayCurrentFiles();
139 161
	}
140 162

  
141
	
142 163
	/*
164
	 * load all file that are in the container
165
	 */
143 166
	private void loadFiles() {
144
		//displayLoadingCell();
167
		displayLoadingCell();
145 168
		new LoadFilesTask().execute();
146 169
	}
147
	*/
148 170
	
149
	private void loadFiles(){
150
		CloudServersException exception = null;
151

  
152
		ArrayList<ContainerObjects> result = null;
153
		try {
154
			result = (new ContainerObjectManager(context)).createList(true,
155
					container.getName());
156
		} catch (CloudServersException e) {
157
			exception = e;
158
			e.printStackTrace();
159
		}
160
		if (exception != null) {
161
			showAlert("Error", exception.getMessage());
162
		}
163
		setFileList(result);
171
	private void displayLoadingCell() {
172
		String a[] = new String[1];
173
		a[0] = "Loading...";
174
		setListAdapter(new ArrayAdapter<String>(this, R.layout.loadingcell,
175
				R.id.loading_label, a));
176
		getListView().setTextFilterEnabled(true);
177
		getListView().setDividerHeight(0); // hide the dividers so it won't look
178
											// like a list row
179
		getListView().setItemsCanFocus(false);
164 180
	}
165

  
166

  
167

  
168 181
	
169 182
	/* load only the files that should display for the 
170 183
	 * current directory in the curDirFiles[]
......
227 240
	}
228 241
	
229 242
	private void displayCurrentFiles(){
230
		if(curDirFiles!=null)
231 243
		loadCurrentDirectoryFiles();
232 244
		if (curDirFiles.length == 0) {
233 245
			displayNoServersCell();
234 246
		} else {
235 247
			getListView().setDividerHeight(1); // restore divider lines
236
			setListAdapter(new FileAdapter());
248
			adapter = new FileAdapter();
249
			setListAdapter(adapter);
237 250
		}
238 251
	}
239 252

  
......
429 442
					public void onClick(DialogInterface dialog,
430 443
							int whichButton) {
431 444
						// User clicked OK so do some stuff
432
						new DeleteObjectTask()
433
						.execute();
445
						new DeleteObjectTask().execute();
434 446
					}
435 447
				})
436 448
				.setNegativeButton("Cancel",
......
535 547
	
536 548
		public View getView(int position, View convertView, ViewGroup parent) {
537 549
	
550
			Log.d("info", "captin updating position " + position);
551
			
538 552
			ContainerObjects file = curDirFiles[position];
539 553
			LayoutInflater inflater = getLayoutInflater();
540 554
			View row = inflater.inflate(R.layout.listcontainerobjectcell,
......
563 577

  
564 578
	private class LoadFilesTask extends
565 579
			AsyncTask<String, Void, ArrayList<ContainerObjects>> {
566
	
580

  
567 581
		private CloudServersException exception;
568
		/*
569 582
		protected void onPreExecute(){
570
			dialog = ProgressDialog.show(ContainerObjectsActivity.this, "", "Loading Files...", true);
583
			loadingFiles = true;
571 584
		}
572
		*/
585
		
573 586
		@Override
574 587
		protected ArrayList<ContainerObjects> doInBackground(String... path) {
575 588
			ArrayList<ContainerObjects> files = null;
......
590 603
				showAlert("Error", exception.getMessage());
591 604
			}
592 605
			setFileList(result);
606
			loadingFiles = false;
593 607
		}
608

  
594 609
	}
595 610

  
596 611
	private class DeleteObjectTask extends
......
599 614
		private CloudServersException exception;
600 615
		
601 616
		protected void onPreExecute(){
602
			dialog = ProgressDialog.show(ContainerObjectsActivity.this, "", "Deleting...", true);
617
			//dialog = ProgressDialog.show(ContainerObjectsActivity.this, "", "Deleting...", true);
603 618
		}
604 619
		
605 620
		@Override
......
616 631

  
617 632
		@Override
618 633
		protected void onPostExecute(HttpResponse response) {
619
			dialog.dismiss();
634
			//dialog.dismiss();
620 635
			if (response != null) {
621 636
				int statusCode = response.getStatusLine().getStatusCode();
622 637
				if (statusCode == 409) {
b/src/com/rackspacecloud/android/ListContainerActivity.java
41 41
	public int kbConver = 1024;
42 42
	protected static final int DELETE_ID = 0;
43 43
	private Context context;
44
	private boolean loading;
44 45
	
45 46
	@Override
46 47
	public void onCreate(Bundle savedInstanceState) {
......
53 54
	protected void onSaveInstanceState(Bundle outState) {
54 55
		super.onSaveInstanceState(outState);
55 56
		outState.putSerializable("container", containers);
57
		outState.putBoolean("loading", loading);
56 58
	}
57 59

  
58 60
	private void restoreState(Bundle state) {
59
		if (state != null && state.containsKey("container")) {
61
		loading = state!= null && state.containsKey("loading") && state.getBoolean("loading");
62
		if (state != null && state.containsKey("container") && !loading) {
60 63
			containers = (Container[]) state.getSerializable("container");
61 64
			if (containers.length == 0) {
62 65
				displayNoServersCell();
......
75 78
			Intent viewIntent = new Intent(this, ContainerObjectsActivity.class);
76 79
			viewIntent.putExtra("container", containers[position]);
77 80
			startActivityForResult(viewIntent, 55);
78

  
79
			// startActivityForResult(viewIntent, 55); // arbitrary number;
80
			// never used again
81 81
		}
82 82
	}
83 83

  
......
142 142
		private CloudServersException exception;
143 143

  
144 144
		@Override
145
		protected void onPreExecute(){
146
			loading = true;
147
		}
148
			
149
		@Override
145 150
		protected ArrayList<Container> doInBackground(Void... arg0) {
146 151
			ArrayList<Container> containers = null;
147 152

  
......
168 173
					containerNames[i] = container.getName();
169 174
				}
170 175
			}
171

  
176
			loading = false;
172 177
			new LoadCDNContainersTask().execute((Void[]) null);
173 178
		}
174 179
	}
......
179 184
		private CloudServersException exception;
180 185

  
181 186
		@Override
187
		protected void onPreExecute(){
188
			loading = true;
189
		}
190
		
191
		@Override
182 192
		protected ArrayList<Container> doInBackground(Void... arg0) {
183 193
			ArrayList<Container> cdnContainers = null;
184 194

  
......
211 221
				}
212 222
			}
213 223
			setContainerList();
224
			loading = false;
214 225
		}
215 226
	}
216 227

  
b/src/com/rackspacecloud/android/ListServersActivity.java
34 34
public class ListServersActivity extends ListActivity {
35 35

  
36 36
	private Server[] servers;
37
	Context context;
37
	private Context context;
38
	private boolean loading;
38 39
	
39 40
	@Override
40 41
    public void onCreate(Bundle savedInstanceState) {
......
47 48
	protected void onSaveInstanceState(Bundle outState) {
48 49
		super.onSaveInstanceState(outState);
49 50
		outState.putSerializable("servers", servers);
51
		outState.putBoolean("loading", loading);
50 52
	}
51 53

  
52 54
    private void restoreState(Bundle state) {
53
    	if (state != null && state.containsKey("servers")) {
55
    	boolean loading = state != null && state.containsKey("loading") && state.getBoolean("loading");
56
    	if (state != null && state.containsKey("servers") && !loading) {
54 57
    		servers = (Server[]) state.getSerializable("servers");
55 58
    		if (servers.length == 0) {
56 59
    			displayNoServersCell();
......
139 142
    	
140 143
    	private CloudServersException exception;
141 144
    	
145
    	protected void onPreExecute(){
146
    		loading = true;
147
    	}
148
    	
142 149
		@Override
143 150
		protected ArrayList<Server> doInBackground(Void... arg0) {
144 151
			ArrayList<Server> servers = null;
......
156 163
				showAlert("Error", exception.getMessage());
157 164
			}
158 165
			setServerList(result);
166
			loading = false;
159 167
		}
160 168
    }
161 169
    
/dev/null
1
package com.rackspacecloud.android;
2

  
3
import com.github.droidfu.DroidFuApplication;
4

  
5
public class MyApplication extends DroidFuApplication{
6

  
7
}
b/src/com/rackspacecloud/android/TabViewActivity.java
5 5

  
6 6
import android.app.TabActivity;
7 7
import android.content.Intent;
8
import android.util.Log;
9 8
import android.widget.TabHost;
10 9
import android.os.Bundle;
11 10

  
......
31 30
		spec.setIndicator("Cloud Files", getResources().getDrawable(R.drawable.cloudfiles));
32 31
		tabs.addTab(spec);
33 32
		
34
		Log.d("tabview", "captin we have made it");
35 33
	}
36 34
	
37 35
}
b/src/com/rackspacecloud/android/ViewServerActivity.java
29 29
import android.graphics.Color;
30 30
import android.os.AsyncTask;
31 31
import android.os.Bundle;
32
import android.util.Log;
33 32
import android.view.View;
34 33
import android.view.View.OnClickListener;
35 34
import android.widget.Button;

Also available in: Unified diff