Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56548156 authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

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
parent c5310446
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -125,11 +125,6 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
        mPinnedHeaderFrameLayout.setVisibility(View.VISIBLE);
    }

    public void clearPinnedHeaderView() {
        mPinnedHeaderFrameLayout.removeAllViews();
        mPinnedHeaderFrameLayout.setVisibility(View.GONE);
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
+8 −9
Original line number Diff line number Diff line
@@ -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,7 +58,6 @@ 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);
@@ -65,7 +65,6 @@ public class RestrictedProfileSettings extends AppRestrictionsFragment
        mDeleteButton = (ImageView) mHeaderView.findViewById(R.id.delete);
        mDeleteButton.setOnClickListener(this);
        getListView().setFastScrollEnabled(true);
        }
        // This is going to bind the preferences.
        super.onActivityCreated(savedInstanceState);
    }