Revision eb3b3154 src/com/rackspacecloud/android/ListContainerActivity.java
b/src/com/rackspacecloud/android/ListContainerActivity.java | ||
---|---|---|
28 | 28 |
import com.rackspace.cloud.files.api.client.ContainerManager; |
29 | 29 |
import com.rackspace.cloud.servers.api.client.CloudServersException; |
30 | 30 |
|
31 |
/** |
|
32 |
* |
|
33 |
* @author Phillip Toohill |
|
34 |
* |
|
35 |
*/ |
|
36 | 31 |
public class ListContainerActivity extends ListActivity { |
37 | 32 |
|
38 | 33 |
protected static final int DELETE_ID = 0; |
... | ... | |
88 | 83 |
} |
89 | 84 |
|
90 | 85 |
private void loadContainers() { |
91 |
showProgressDialog();
|
|
86 |
// displayNoContainersCell();
|
|
92 | 87 |
new LoadContainersTask().execute((Void[]) null); |
93 | 88 |
} |
94 | 89 |
|
... | ... | |
160 | 155 |
|
161 | 156 |
@Override |
162 | 157 |
protected void onPreExecute(){ |
158 |
showProgressDialog(); |
|
163 | 159 |
loading = true; |
164 | 160 |
} |
165 | 161 |
|
166 | 162 |
@Override |
167 | 163 |
protected ArrayList<Container> doInBackground(Void... arg0) { |
168 | 164 |
ArrayList<Container> containers = null; |
169 |
|
|
170 | 165 |
try { |
171 | 166 |
containers = (new ContainerManager(context)).createList(true); |
172 | 167 |
} catch (CloudServersException e) { |
173 | 168 |
exception = e; |
174 | 169 |
} |
170 |
pDialog.dismiss(); |
|
175 | 171 |
return containers; |
176 | 172 |
} |
177 | 173 |
|
... | ... | |
190 | 186 |
containerNames[i] = container.getName(); |
191 | 187 |
} |
192 | 188 |
} |
189 |
pDialog.dismiss(); |
|
193 | 190 |
loading = false; |
194 | 191 |
new LoadCDNContainersTask().execute((Void[]) null); |
195 | 192 |
} |
... | ... | |
209 | 206 |
@Override |
210 | 207 |
protected ArrayList<Container> doInBackground(Void... arg0) { |
211 | 208 |
ArrayList<Container> cdnContainers = null; |
212 |
|
|
213 | 209 |
try { |
214 | 210 |
cdnContainers = (new ContainerManager(context)).createCDNList(true); |
215 | 211 |
} catch (CloudServersException e) { |
216 | 212 |
exception = e; |
217 | 213 |
} |
214 |
pDialog.dismiss(); |
|
218 | 215 |
return cdnContainers; |
219 | 216 |
} |
220 | 217 |
|
221 | 218 |
@Override |
222 | 219 |
protected void onPostExecute(ArrayList<Container> result) { |
223 | 220 |
Log.v("listcontainerActivity", "onPostExecute loadCDNcontainerTask"); |
224 |
pDialog.dismiss(); |
|
225 | 221 |
if (exception != null) { |
226 | 222 |
showAlert("Error", exception.getMessage()); |
227 | 223 |
} |
... | ... | |
239 | 235 |
} |
240 | 236 |
} |
241 | 237 |
} |
238 |
pDialog.dismiss(); |
|
242 | 239 |
setContainerList(); |
243 | 240 |
loading = false; |
244 | 241 |
} |
Also available in: Unified diff