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

Commit 4ea6657d authored by Jason Monk's avatar Jason Monk
Browse files

Clear out old views when setting new content in settings

Bug: 27529989
Change-Id: Id44ca442c2117bc5df7929bcd79434c0ae23cded
parent a3a3f35e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -176,8 +176,11 @@ public class SettingsDrawerActivity extends Activity {

    @Override
    public void setContentView(@LayoutRes int layoutResID) {
        LayoutInflater.from(this).inflate(layoutResID,
                (ViewGroup) findViewById(R.id.content_frame));
        final ViewGroup parent = (ViewGroup) findViewById(R.id.content_frame);
        if (parent != null) {
            parent.removeAllViews();
        }
        LayoutInflater.from(this).inflate(layoutResID, parent);
    }

    @Override