diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-04-04 05:01:35 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-04-04 11:28:26 +0200 |
commit | 2227705d650d1e9bf3e59202a093af129c272f04 (patch) | |
tree | 7a1ecbc93337d8a1b5370ce626567fcf4e251ad8 /OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui | |
parent | d921cca91312e5888f98b178252efa2f5db103cf (diff) | |
download | open-keychain-2227705d650d1e9bf3e59202a093af129c272f04.tar.gz open-keychain-2227705d650d1e9bf3e59202a093af129c272f04.tar.bz2 open-keychain-2227705d650d1e9bf3e59202a093af129c272f04.zip |
db-overhaul: fix loading indicators in KeyListActivity and ViewKeyActivity
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui')
3 files changed, 13 insertions, 3 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java index b688dec51..33ccd3a23 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java @@ -154,9 +154,6 @@ public class KeyListFragment extends Fragment } catch (ApiLevelTooLowException e) { } - // this view is made visible if no data is available - mStickyList.setEmptyView(getActivity().findViewById(R.id.key_list_empty)); - /* * ActionBarSherlock does not support MultiChoiceModeListener. Thus multi-selection is only * available for Android >= 3.0 @@ -291,6 +288,9 @@ public class KeyListFragment extends Fragment mStickyList.setAdapter(mAdapter); + // this view is made visible if no data is available + mStickyList.setEmptyView(getActivity().findViewById(R.id.key_list_empty)); + // NOTE: Not supported by StickyListHeader, but reimplemented here // The list should now be shown. if (isResumed()) { diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java index 5760f7d8c..653114c6c 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -28,6 +28,7 @@ import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; +import android.view.Window; import android.widget.Toast; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Id; @@ -59,6 +60,7 @@ public class ViewKeyActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { + requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); mExportHelper = new ExportHelper(this); diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyMainFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyMainFragment.java index 616200800..ae8b6d595 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyMainFragment.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyMainFragment.java @@ -30,6 +30,7 @@ import android.text.format.DateFormat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; @@ -55,6 +56,7 @@ public class ViewKeyMainFragment extends Fragment implements public static final String ARG_DATA_URI = "uri"; + private LinearLayout mContainer; private TextView mName; private TextView mEmail; private TextView mComment; @@ -83,6 +85,7 @@ public class ViewKeyMainFragment extends Fragment implements public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.view_key_main_fragment, container, false); + mContainer = (LinearLayout) view.findViewById(R.id.container); mName = (TextView) view.findViewById(R.id.name); mEmail = (TextView) view.findViewById(R.id.email); mComment = (TextView) view.findViewById(R.id.comment); @@ -121,6 +124,9 @@ public class ViewKeyMainFragment extends Fragment implements return; } + getActivity().setProgressBarIndeterminateVisibility(Boolean.TRUE); + mContainer.setVisibility(View.GONE); + mDataUri = dataUri; Log.i(Constants.TAG, "mDataUri: " + mDataUri.toString()); @@ -319,6 +325,8 @@ public class ViewKeyMainFragment extends Fragment implements default: break; } + getActivity().setProgressBarIndeterminateVisibility(Boolean.FALSE); + mContainer.setVisibility(View.VISIBLE); } /** |