diff options
author | Maurice Lam <yukl@google.com> | 2015-04-21 23:01:11 -0700 |
---|---|---|
committer | Maurice Lam <yukl@google.com> | 2015-04-29 22:38:22 -0700 |
commit | 28c3f6bb71da1727fdc39bdc622518b1daeb3b0a (patch) | |
tree | 3f662b71bb718d89887ba3bbf569fd477c0d2d25 /src/com/android/settings/users | |
parent | bc95630994227736aff46885ca1d9345829e83e2 (diff) | |
download | packages_apps_Settings-28c3f6bb71da1727fdc39bdc622518b1daeb3b0a.zip packages_apps_Settings-28c3f6bb71da1727fdc39bdc622518b1daeb3b0a.tar.gz packages_apps_Settings-28c3f6bb71da1727fdc39bdc622518b1daeb3b0a.tar.bz2 |
[WifiSettings] Add progress bar when scanning
Add a progress bar when the Wi-Fi screen is in a transient state,
like enabling, disabling Wi-Fi and scanning for network. This change
sets the progress bar as a pinned header at the top of the activity.
The pinned header container needs to be match parent so that the
progress bar can occupy the full width of the screen. If the header
view doesn't want to fill the width, then the header view *inside*
the container should be wrap_content.
Added an overloaded setPinnedHeader method that takes a layout
resource ID, and returns the view to the caller. This way the
inflater can set the parent property so that layout params will not
be ignored.
Bug: 17389577
Change-Id: I18d0eb7c72ad31d1c4b35a54789016c32c81fb93
Diffstat (limited to 'src/com/android/settings/users')
-rw-r--r-- | src/com/android/settings/users/RestrictedProfileSettings.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/com/android/settings/users/RestrictedProfileSettings.java b/src/com/android/settings/users/RestrictedProfileSettings.java index 03a55d4..7b698cf 100644 --- a/src/com/android/settings/users/RestrictedProfileSettings.java +++ b/src/com/android/settings/users/RestrictedProfileSettings.java @@ -22,7 +22,6 @@ import android.content.Intent; import android.content.pm.UserInfo; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.TextView; @@ -59,9 +58,7 @@ public class RestrictedProfileSettings extends AppRestrictionsFragment @Override public void onActivityCreated(Bundle savedInstanceState) { if (mHeaderView == null) { - mHeaderView = LayoutInflater.from(getActivity()).inflate( - R.layout.user_info_header, null); - setPinnedHeaderView(mHeaderView); + mHeaderView = setPinnedHeaderView(R.layout.user_info_header); mHeaderView.setOnClickListener(this); mUserIconView = (ImageView) mHeaderView.findViewById(android.R.id.icon); mUserNameView = (TextView) mHeaderView.findViewById(android.R.id.title); |