Revision 2c815395

b/AndroidManifest.xml
53 53
			</intent-filter>
54 54
		</activity>
55 55
		<activity android:name=".ContainerObjectsActivity"
56
			android:label="@string/app_name">
56
			android:label="@string/app_name" android:configChanges="orientation">
57 57
			<intent-filter>
58 58
				<action android:name="android.intent.action.MAIN" />
59 59
				<category android:name="android.intent.category.APPLICATION" />
......
67 67
			</intent-filter>
68 68
		</activity>
69 69
		<activity android:name=".ContainerObjectDetails"
70
			android:label="@string/app_name"
71
			android:configChanges="orientation">
70
			android:label="@string/app_name">
72 71
			<intent-filter>
73 72
				<action android:name="android.intent.action.MAIN" />
74 73
				<category android:name="android.intent.category.APPLICATION" />
b/src/com/rackspace/cloud/files/api/client/ContainerManager.java
157 157
	}
158 158
	public HttpResponse disable(String container, String cdn, String ttl, String logRet)
159 159
	throws CloudServersException {
160
       HttpResponse resp = null;
160
        HttpResponse resp = null;
161 161
 	    CustomHttpClient httpclient = new CustomHttpClient(context);
162 162
       	HttpPost post = new HttpPost(Account.getAccount().getCdnManagementUrl() + "/"
163 163
		+ container);
b/src/com/rackspacecloud/android/ContainerObjectsActivity.java
137 137
		loadCurrentDirectoryFiles();
138 138
		displayCurrentFiles();
139 139
	}
140

  
141 140
	
142
	/*
143 141
	private void loadFiles() {
144 142
		//displayLoadingCell();
145 143
		new LoadFilesTask().execute();
146 144
	}
147
	*/
148
	
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);
164
	}
165

  
166 145

  
167

  
168
	
169 146
	/* load only the files that should display for the 
170 147
	 * current directory in the curDirFiles[]
171 148
	 */
......
184 161
				curDirFiles[i] = curFiles.get(i);
185 162
			}
186 163
		}
164
		else{
165
			curDirFiles = new ContainerObjects[0];
166
		}
187 167
	}
188 168
	
189 169
	/*
......
213 193
		String[] fileNames = new String[files.size()];
214 194
		this.files = new ContainerObjects[files.size()];
215 195

  
216
		
217
		
218 196
		if (files != null) {
219 197
			for (int i = 0; i < files.size(); i++) {
220 198
				ContainerObjects file = files.get(i);
......
227 205
	}
228 206
	
229 207
	private void displayCurrentFiles(){
230
		if(curDirFiles!=null)
208
		
231 209
		loadCurrentDirectoryFiles();
232 210
		if (curDirFiles.length == 0) {
233 211
			displayNoServersCell();
......
527 505
		return cse;
528 506
	}
529 507
	
508
	private String arrToString(){
509
		String res = "";
510
		for(int i = 0; i < curDirFiles.length; i++){
511
			res += curDirFiles[i].getCName() + " ";
512
		}
513
		return res;
514
	}
515
	
530 516
	class FileAdapter extends ArrayAdapter<ContainerObjects> {
531 517
		FileAdapter() {
532 518
			super(ContainerObjectsActivity.this,
533 519
					R.layout.listcontainerobjectcell, curDirFiles);		
520
			Log.d("info", "captin" +  arrToString());
534 521
		}
535 522
	
536 523
		public View getView(int position, View convertView, ViewGroup parent) {
537
	
524
			Log.d("info", "captin using position: " + position);
538 525
			ContainerObjects file = curDirFiles[position];
539 526
			LayoutInflater inflater = getLayoutInflater();
540 527
			View row = inflater.inflate(R.layout.listcontainerobjectcell,

Also available in: Unified diff