Revision 71e52c4a src/com/rackspacecloud/android/CloudListActivity.java
b/src/com/rackspacecloud/android/CloudListActivity.java | ||
---|---|---|
31 | 31 |
import android.widget.ProgressBar; |
32 | 32 |
import android.widget.Toast; |
33 | 33 |
|
34 |
/* |
|
35 |
* CloudActivity manages the display and hiding of |
|
36 |
* pDialog. |
|
37 |
* |
|
38 |
* Also provides many accessory methods that are common |
|
39 |
* to Activities |
|
40 |
*/ |
|
34 | 41 |
public class CloudListActivity extends GaListActivity{ |
35 | 42 |
|
36 | 43 |
private Context context; |
... | ... | |
73 | 80 |
|
74 | 81 |
} |
75 | 82 |
|
83 |
@Override |
|
84 |
protected void onStart(){ |
|
85 |
super.onStart(); |
|
86 |
if(isLoading){ |
|
87 |
showDialog(); |
|
88 |
} |
|
89 |
} |
|
90 |
|
|
91 |
@Override |
|
92 |
protected void onStop(){ |
|
93 |
super.onStop(); |
|
94 |
if(isLoading){ |
|
95 |
hideDialog(); |
|
96 |
isLoading = true; |
|
97 |
} |
|
98 |
} |
|
99 |
|
|
76 | 100 |
protected final void showAlert(String title, String message) { |
77 | 101 |
try { |
78 | 102 |
AlertDialog alert = new AlertDialog.Builder(this).create(); |
... | ... | |
157 | 181 |
finish(); |
158 | 182 |
} |
159 | 183 |
}); |
160 |
|
|
161 | 184 |
pDialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND); |
162 | 185 |
pDialog.show(); |
163 | 186 |
pDialog.setContentView(new ProgressBar(this), new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); |
... | ... | |
167 | 190 |
protected Context getContext(){ |
168 | 191 |
return context; |
169 | 192 |
} |
170 |
|
|
171 | 193 |
} |
Also available in: Unified diff