From c5d010c86f05c8ccb5956ba97473d0769a3b47fd Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Thu, 13 Feb 2014 11:44:07 -0800 Subject: [PATCH] Quick progressbar sample for network operations during group create --- res/layout/group_create_activity.xml | 29 +++++++++++++++++ .../securesms/GroupCreateActivity.java | 31 ++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/res/layout/group_create_activity.xml b/res/layout/group_create_activity.xml index 9388d60aa7..e707dd44c3 100644 --- a/res/layout/group_create_activity.xml +++ b/res/layout/group_create_activity.xml @@ -12,6 +12,7 @@ android:layout_marginBottom="20dp"> + + + + + + + () { + + @Override + protected Void doInBackground(Void... voids) { + try { + Thread.sleep(5000); // todo network things + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + return null; + } + + @Override + protected void onPostExecute(Void aVoid) { + super.onPostExecute(aVoid); + finish(); + } + + @Override + protected void onProgressUpdate(Void... values) { + super.onProgressUpdate(values); + } + }.execute(); return true; }