package fr.talk.androidtests.how.objvsstatic;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import fr.talk.androidtests.R;

public class ProfileActivity extends Activity {

    TextView profileNameTextView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_profile);

        profileNameTextView = (TextView) findViewById(R.id.profileNameTextView);
    }

    /**
     * Update name or set as gone if name unknown
     */
    public void updateProfileName() {
        String name = ProfileUtils.getCurrentUserName(this);
        if (name == null) {
            profileNameTextView.setVisibility(View.GONE);
        } else {
            profileNameTextView.setVisibility(View.VISIBLE);
            profileNameTextView.setText(name);
        }
    }
}

@@ -69,16 +69,48 @@
 tivity;%0A
+import android.content.Context;%0A
 import a
@@ -948,11 +948,241 @@
  %7D%0A    %7D
+%0A%0A    //region Profile manager%0A    private static class ProfileManager %7B%0A        private final Context context;%0A%0A        private ProfileManager(Context context) %7B%0A            this.context = context;%0A        %7D%0A    %7D%0A    //endregion
 %0A%7D%0A

Add profile manager code