Fixed an issue with back key behavior
Create mHeaderView and set it as a pinned header, each time onActivityCreated is called. Bug: 20652673 Change-Id: Ia0e174f0686ac0abb601c591f3774c9152b785fa
This commit is contained in:
@@ -23,6 +23,7 @@ import android.content.pm.UserInfo;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -57,15 +58,13 @@ public class RestrictedProfileSettings extends AppRestrictionsFragment
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
if (mHeaderView == null) {
|
||||
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);
|
||||
mDeleteButton = (ImageView) mHeaderView.findViewById(R.id.delete);
|
||||
mDeleteButton.setOnClickListener(this);
|
||||
getListView().setFastScrollEnabled(true);
|
||||
}
|
||||
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);
|
||||
mDeleteButton = (ImageView) mHeaderView.findViewById(R.id.delete);
|
||||
mDeleteButton.setOnClickListener(this);
|
||||
getListView().setFastScrollEnabled(true);
|
||||
// This is going to bind the preferences.
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
}
|
||||
|
Reference in New Issue
Block a user